mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-06 06:47:46 +02:00
det == 0 is never error
This commit is contained in:
@@ -18,10 +18,7 @@ function _tri_circumcircle(shape_pts) =
|
|||||||
d0 = (p1 + p0) / 2 * v0,
|
d0 = (p1 + p0) / 2 * v0,
|
||||||
v1 = p2 - p1,
|
v1 = p2 - p1,
|
||||||
d1 = (p2 + p1) / 2 * v1,
|
d1 = (p2 + p1) / 2 * v1,
|
||||||
det = -cross(v0 , v1)
|
det = -cross(v0 , v1),
|
||||||
)
|
|
||||||
det == 0 ? undef :
|
|
||||||
let(
|
|
||||||
x = (d1 * v0.y - d0 * v1.y) / det,
|
x = (d1 * v0.y - d0 * v1.y) / det,
|
||||||
y = (d0 * v1.x - d1 * v0.x) / det,
|
y = (d0 * v1.x - d1 * v0.x) / det,
|
||||||
center = [x, y],
|
center = [x, y],
|
||||||
|
Reference in New Issue
Block a user