mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-01-29 11:58:39 +01:00
refactor
This commit is contained in:
parent
7b301bdc74
commit
038429ede7
@ -5,12 +5,11 @@ function __line_intersection2(line_pts1, line_pts2, epsilon = 0.0001) =
|
||||
b1 = line_pts2[0],
|
||||
b2 = line_pts2[1],
|
||||
a = a2 - a1,
|
||||
b = b2 - b1,
|
||||
s = b1 - a1,
|
||||
b = b2 - b1,
|
||||
c = cross(a, b)
|
||||
)
|
||||
abs(c) < epsilon ? [] : // they are parallel or conincident edges
|
||||
a1 + a * cross(s, b) / c;
|
||||
a1 + a * cross(b1 - a1, b) / c;
|
||||
|
||||
function __line_intersection3(line_pts1, line_pts2, epsilon = 0.0001) =
|
||||
let(
|
||||
|
Loading…
x
Reference in New Issue
Block a user