Revert change in recursion threshold as the new code reaches the desired precision earlier.

This commit is contained in:
Jürg Lehni 2015-01-04 13:21:12 +01:00
parent cca6606f72
commit d33d65fcc2

View file

@ -1089,9 +1089,7 @@ new function() { // Scope for methods that require numerical integration
dp2 = getSignedDistance(q0x, q0y, q3x, q3y, v1[4], v1[5]),
dp3 = getSignedDistance(q0x, q0y, q3x, q3y, v1[6], v1[7]),
tMinNew, tMaxNew, tDiff;
// NOTE: the recursion threshold of 4 is needed to prevent issue #571
// from occurring: https://github.com/paperjs/paper.js/issues/571
if (q0x === q3x && uMax - uMin <= epsilon && recursion > 4) {
if (q0x === q3x && uMax - uMin <= epsilon && recursion > 3) {
// The fatline of Q has converged to a point, the clipping is not
// reliable. Return the value we have even though we will miss the
// precision.