diff --git a/src/path/Curve.js b/src/path/Curve.js index 10926814..dae00bb7 100644 --- a/src/path/Curve.js +++ b/src/path/Curve.js @@ -1049,7 +1049,7 @@ new function() { // Scope for methods that require numerical integration // Get length of total range rangeLength = Numerical.integrate(ds, a, b, getIterations(a, b)); - if (abs(offset - rangeLength) <= tolerance) { + if (abs(offset - rangeLength) < tolerance) { // Matched the end: return forward ? b : a; } else if (abs(offset) > rangeLength) { @@ -1115,7 +1115,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; - if (q0x === q3x && uMax - uMin <= tolerance && recursion > 3) { + if (q0x === q3x && uMax - uMin < tolerance && 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. diff --git a/src/path/PathItem.Boolean.js b/src/path/PathItem.Boolean.js index 710f8c65..6608a956 100644 --- a/src/path/PathItem.Boolean.js +++ b/src/path/PathItem.Boolean.js @@ -138,15 +138,15 @@ PathItem.inject(new function() { if (length <= curveLength) { // If the selected location on the curve falls onto its // beginning or end, use the curve's center instead. - if (length <= tolerance - || curveLength - length <= tolerance) + if (length < tolerance + || curveLength - length < tolerance) length = curveLength / 2; var curve = node.segment.getCurve(), pt = curve.getPointAt(length), // Determine if the curve is a horizontal linear // curve by checking the slope of it's tangent. hor = curve.isLinear() && Math.abs(curve - .getTangentAt(0.5, true).y) <= tolerance, + .getTangentAt(0.5, true).y) < tolerance, path = curve._path; if (path._parent instanceof CompoundPath) path = path._parent; @@ -320,7 +320,7 @@ PathItem.inject(new function() { // Detect and exclude intercepts at 'end' of loops: && (i === l - 1 || curve.next !== curves[i + 1]) && abs(Curve.evaluate(curve.next.values, 0, 0).x -x) - <= tolerance + < tolerance // Detect 2nd case of a consecutive intercept, but make // sure we're still on the same loop || i > 0 && curve.previous === curves[i - 1]