Skip to content

Commit

Permalink
use epsilon for solving Bezier curve
Browse files Browse the repository at this point in the history
  • Loading branch information
flyover committed Dec 15, 2015
1 parent 2c4d598 commit 07b3cdb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spine.js
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ spine.BezierCurve = function (x1, y1, x2, y2, epsilon)
x2 = curveX(t2) - x;
if (Math.abs(x2) < epsilon) return curveY(t2);
d2 = derivativeCurveX(t2);
if (Math.abs(d2) < 1e-6) break;
if (Math.abs(d2) < epsilon) break;
t2 = t2 - (x2 / d2);
}

Expand Down

0 comments on commit 07b3cdb

Please sign in to comment.