improve break-off condition in curve interesection code.

To prevent arbitrary incorrect solutions occuring when tDiff is very close to zero.
Closes #762.
This commit is contained in:
Jürg Lehni 2015-08-30 14:37:21 +02:00
parent 27aae8b261
commit bd61390f9d

View file

@ -1335,7 +1335,7 @@ new function() { // Scope for methods that require private functions
curve1, t1, Curve.getPoint(v1, t1),
curve2, t2, Curve.getPoint(v2, t2));
}
} else if (tDiff > 0) { // Iterate
} else if (tDiff > /*#=*/Numerical.EPSILON) { // Iterate
addCurveIntersections(v2, v1, curve2, curve1, locations, include,
uMin, uMax, tMinNew, tMaxNew, tDiff, !reverse, ++recursion);
}