delaunator-cpp icon indicating copy to clipboard operation
delaunator-cpp copied to clipboard

Suspect div by zero case.

Open projectPythonator opened this issue 8 months ago • 1 comments

technically this case should only really happen in circumradius and circumcircle functions when you have 3 horizontal or vertical collinear points. if a d == 0 check is moved before you divide by d (or det) you can avoid it, alternatively you can also check for collinear points directly if wanting to detect them.

projectPythonator avatar Apr 14 '25 12:04 projectPythonator

I can certainly prevent the divide-by-zero, but the question is what should be done at that point. I'm not sure how much trouble this is worth unless there's a good test case.

abellgithub avatar Apr 14 '25 14:04 abellgithub