From bd61390f9dd0e4363a7063785688408cd65234e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Sun, 30 Aug 2015 14:37:21 +0200 Subject: [PATCH] improve break-off condition in curve interesection code. To prevent arbitrary incorrect solutions occuring when tDiff is very close to zero. Closes #762. --- src/path/Curve.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/path/Curve.js b/src/path/Curve.js index 9bd2fb13..b6903d19 100644 --- a/src/path/Curve.js +++ b/src/path/Curve.js @@ -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); }