mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Add comments about initial guess.
This commit is contained in:
parent
83fea3bf4e
commit
58f5c8554e
1 changed files with 4 additions and 1 deletions
|
@ -265,7 +265,10 @@ var Curve = this.Curve = Base.extend({
|
|||
return Curve.getPartLength(
|
||||
p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t) - length;
|
||||
}
|
||||
return MathUtils.brent(f, 0, length / bezierLength, 10e-6);
|
||||
// Use length / bezierLength for an initial guess for b, to bring
|
||||
// us closer:
|
||||
return MathUtils.brent(f, 0, length / bezierLength,
|
||||
MathUtils.TOLERANCE);
|
||||
}
|
||||
}
|
||||
}, new function() {
|
||||
|
|
Loading…
Reference in a new issue