tweak delauny code to be more strict on it's colinear detection

This commit is contained in:
Jon Atkins
2013-06-15 03:47:58 +01:00
parent 5a62d92620
commit ea46405cd9

View File

@ -18,7 +18,7 @@
/* If the points of the triangle are collinear, then just find the
* extremes and use the midpoint as the center of the circumcircle. */
if(Math.abs(G) < 0.000001) {
if(Math.abs(G) < 1e-12) {
minx = Math.min(a.x, b.x, c.x)
miny = Math.min(a.y, b.y, c.y)
dx = (Math.max(a.x, b.x, c.x) - minx) * 0.5