mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-07 13:22:07 -05:00
Minor code cleanup.
This commit is contained in:
parent
ba0c6dafea
commit
a20f988511
1 changed files with 5 additions and 5 deletions
|
@ -366,13 +366,13 @@ var Curve = this.Curve = Base.extend({
|
|||
p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y),
|
||||
// Get length of total range
|
||||
rangeLength = Numerical.integrate(ds, a, b,
|
||||
getIterations(a, b)),
|
||||
// Use length / rangeLength for an initial guess for t, to
|
||||
// bring us closer:
|
||||
guess = length / rangeLength,
|
||||
len = 0;
|
||||
getIterations(a, b));
|
||||
if (length >= rangeLength)
|
||||
return forward ? b : a;
|
||||
// Use length / rangeLength for an initial guess for t, to
|
||||
// bring us closer:
|
||||
var guess = length / rangeLength,
|
||||
len = 0;
|
||||
// Iteratively calculate curve range lengths, and add them up,
|
||||
// using integration precision depending on the size of the
|
||||
// range. This is much faster and also more precise than not
|
||||
|
|
Loading…
Reference in a new issue