mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-06 04:42:15 -05:00
Rename Curve#getCrossingsFor() -> #getCrossings()
This commit is contained in:
parent
d1185c5f8b
commit
8b6d9746ce
2 changed files with 2 additions and 2 deletions
|
@ -305,7 +305,7 @@ var Curve = this.Curve = Base.extend(/** @lends Curve# */{
|
|||
return this._evaluate(parameter, 2);
|
||||
},
|
||||
|
||||
getCrossingsFor: function(point, prevSlope) {
|
||||
getCrossings: function(point, prevSlope) {
|
||||
// Implement the crossing number algorithm:
|
||||
// http://en.wikipedia.org/wiki/Point_in_polygon
|
||||
// Solve the y-axis cubic polynominal for point.y and count all
|
||||
|
|
|
@ -1175,7 +1175,7 @@ var Path = this.Path = PathItem.extend(/** @lends Path# */{
|
|||
crossings = 0;
|
||||
for (var i = 0, l = curves.length; i < l; i++) {
|
||||
var curve = curves[i];
|
||||
crossings += curve.getCrossingsFor(point,
|
||||
crossings += curve.getCrossings(point,
|
||||
prevCurve.getTangent(1).y);
|
||||
prevCurve = curve;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue