1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-04-19 21:51:57 +02:00

change param

This commit is contained in:
Justin Lin 2021-08-26 20:27:42 +08:00
parent 679e3aae62
commit 2355820034

View File

@ -1,5 +1,8 @@
function tri_is_ccw(p1, p2, p3) =
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]),
_ = assert(area != 0, "points are collinear")
)