diff --git a/src/experimental/tri_is_ccw.scad b/src/experimental/tri_is_ccw.scad index d9e17564..d02edbae 100644 --- a/src/experimental/tri_is_ccw.scad +++ b/src/experimental/tri_is_ccw.scad @@ -1,9 +1,4 @@ function tri_is_ccw(shape_pts) = - let( - p1 = shape_pts[0], - p2 = shape_pts[1], - p3 = shape_pts[2], - area = (p2[0] - p1[0]) * (p3[1] - p1[1]) - (p3[0] - p1[0]) * (p2[1] - p1[1]) - ) + let(area = cross(shape_pts[1] - shape_pts[0], shape_pts[2] - shape_pts[0])) assert(area != 0, "points are collinear") area > 0; \ No newline at end of file