1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-29 17:30:11 +02:00
This commit is contained in:
Justin Lin
2022-05-04 07:49:56 +08:00
parent d92586e839
commit 794730402b

View File

@@ -6,10 +6,10 @@ use <../../util/set/hashset_elems.scad>;
include <../../__comm__/_pt2_hash.scad>;
function _in_convex_r(convex_pts, pt, leng, i = 0) =
let(i1 = i + 1)
i1 == leng ||
cross(convex_pts[i] - pt, convex_pts[i1] - pt) > 0 &&
_in_convex_r(convex_pts, pt, leng, i1);
let(j = i + 1)
j == leng ||
cross(convex_pts[i] - pt, convex_pts[j] - pt) > 0 &&
_in_convex_r(convex_pts, pt, leng, j);
function _in_convex(convex_pts, pt) =
let(leng = len(convex_pts))