mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-05 14:27:45 +02:00
refactor: use sorted
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
use <util/sort.scad>;
|
||||
use <util/sorted.scad>;
|
||||
use <experimental/convex_centroid.scad>;
|
||||
|
||||
function convex_ct_clk_order(points) =
|
||||
let(cpt = convex_centroid(points))
|
||||
sort(points, by = function(p1, p2) cross(p2 - cpt, p1 - cpt));
|
||||
sorted(points, cmp = function(p1, p2) cross(p2 - cpt, p1 - cpt));
|
Reference in New Issue
Block a user