1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-12 17:54:18 +02:00

use norm to support 3D

This commit is contained in:
Justin Lin
2019-06-08 07:54:58 +08:00
parent 810a1d3ece
commit e9e346cb51

View File

@@ -3,4 +3,4 @@ function __in_line2d(line_pts, pt, epsilon = 0.0001) =
v1 = line_pts[0] - pt,
v2 = line_pts[1] - pt
)
(abs(cross(v1, v2)) < epsilon) && ((v1 * v2) <= epsilon);
(norm(cross(v1, v2)) < epsilon) && ((v1 * v2) <= epsilon);