diff --git a/src/triangle/tri_circumcenter.scad b/src/triangle/tri_circumcenter.scad index 4f3a6594..30ea1811 100644 --- a/src/triangle/tri_circumcenter.scad +++ b/src/triangle/tri_circumcenter.scad @@ -19,7 +19,5 @@ function tri_circumcenter(shape_pts) = d1 = (p2 + p1) / 2 * v1, det = -cross(v0 , v1) ) - det == 0 ? undef : [ - cross([d1, d0], [v1.y, v0.y]), - cross([d0, d1], [v0.x, v1.x]) - ] / det; \ No newline at end of file + assert(det != 0, "shape_pts is not a triangle") + [cross([d1, d0], [v1.y, v0.y]), cross([d0, d1], [v0.x, v1.x])] / det; \ No newline at end of file