mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-20 22:39:50 -05:00
Fix comments.
This commit is contained in:
parent
99f6597615
commit
5c3a6f72b6
2 changed files with 2 additions and 5 deletions
|
@ -492,7 +492,7 @@ var Curve = this.Curve = Base.extend(/** @lends Curve# */{
|
|||
},
|
||||
|
||||
// Converts from the point coordinates (p1, c1, c2, p2) for one axis to
|
||||
// the polynomial coefficients and solve the polynomial for val
|
||||
// the polynomial coefficients and solves the polynomial for val
|
||||
solve: function (p1, c1, c2, p2, val) {
|
||||
return Numerical.solveCubic(
|
||||
p2 - p1 + 3 * (c1 - c2), // a
|
||||
|
|
|
@ -1787,14 +1787,11 @@ var Path = this.Path = PathItem.extend(/** @lends Path# */{
|
|||
// t = pi * n + arctan(b cot(phi)) // y
|
||||
var tx = - Math.atan(b * Math.tan(phi)),
|
||||
ty = + Math.atan(b / Math.tan(phi)),
|
||||
// Due to symetry, we don't need to cycle through pi * n
|
||||
// solutions:
|
||||
// Due to symetry, we don't need to cycle through pi * n solutions:
|
||||
x = a * Math.cos(tx) * Math.cos(phi)
|
||||
- b * Math.sin(tx) * Math.sin(phi),
|
||||
y = b * Math.sin(ty) * Math.cos(phi)
|
||||
+ a * Math.cos(ty) * Math.sin(phi);
|
||||
// Now update the join / round padding, as required by
|
||||
// getBounds() and code below.
|
||||
return [Math.abs(x), Math.abs(y)];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue