1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-06 06:47:46 +02:00
This commit is contained in:
Justin Lin
2020-12-21 15:53:43 +08:00
parent 33f9b6b43d
commit fe9e90fede

View File

@@ -6,7 +6,8 @@ function __line_intersection(line_pts1, line_pts2, epsilon = 0.0001) =
b2 = line_pts2[1],
a = a2 - a1,
b = b2 - b1,
s = b1 - a1
s = b1 - a1,
c = cross(a, b)
)
abs(cross(a, b)) < epsilon ? [] : // they are parallel or conincident edges
a1 + a * cross(s, b) / cross(a, b);
abs(c) < epsilon ? [] : // they are parallel or conincident edges
a1 + a * cross(s, b) / c;