mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-03-14 02:59:42 +01:00
use x, y attrs
This commit is contained in:
parent
98280924c1
commit
73067c7557
@ -4,7 +4,7 @@ use <experimental/convex_centroid.scad>;
|
||||
function convex_ct_clk_order(points) =
|
||||
let(
|
||||
cpt = convex_centroid(points),
|
||||
pts_as = [for(p = points) [p, atan2(p[1] - cpt[1], p[0] - cpt[0])]],
|
||||
pts_as = [for(p = points) [p, atan2(p.y - cpt.y, p.x - cpt.x)]],
|
||||
sorted = sort(pts_as, by = "idx", idx = 1)
|
||||
)
|
||||
[for(v = sorted) v[0]];
|
Loading…
x
Reference in New Issue
Block a user