mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-16 03:34:42 +02:00
refactor
This commit is contained in:
@@ -6,9 +6,10 @@ use <../../util/set/hashset_elems.scad>;
|
|||||||
include <../../__comm__/_pt2_hash.scad>;
|
include <../../__comm__/_pt2_hash.scad>;
|
||||||
|
|
||||||
function _in_convex_r(s, convex_pts, pt, leng, i = 0) =
|
function _in_convex_r(s, convex_pts, pt, leng, i = 0) =
|
||||||
i + 1 == leng ||
|
let(i1 = i + 1)
|
||||||
s * cross(convex_pts[i] - pt, convex_pts[i + 1] - pt) > 0 &&
|
i1 == leng ||
|
||||||
_in_convex_r(s, convex_pts, pt, leng, i + 1);
|
s * cross(convex_pts[i] - pt, convex_pts[i1] - pt) > 0 &&
|
||||||
|
_in_convex_r(s, convex_pts, pt, leng, i1);
|
||||||
|
|
||||||
function _in_convex(convex_pts, pt) =
|
function _in_convex(convex_pts, pt) =
|
||||||
let(leng = len(convex_pts))
|
let(leng = len(convex_pts))
|
||||||
|
Reference in New Issue
Block a user