mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-07 07:16:36 +02:00
use assert
This commit is contained in:
@@ -19,7 +19,5 @@ function tri_circumcenter(shape_pts) =
|
|||||||
d1 = (p2 + p1) / 2 * v1,
|
d1 = (p2 + p1) / 2 * v1,
|
||||||
det = -cross(v0 , v1)
|
det = -cross(v0 , v1)
|
||||||
)
|
)
|
||||||
det == 0 ? undef : [
|
assert(det != 0, "shape_pts is not a triangle")
|
||||||
cross([d1, d0], [v1.y, v0.y]),
|
[cross([d1, d0], [v1.y, v0.y]), cross([d0, d1], [v0.x, v1.x])] / det;
|
||||||
cross([d0, d1], [v0.x, v1.x])
|
|
||||||
] / det;
|
|
Reference in New Issue
Block a user