mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-19 06:00:56 -05:00
Shorten code a bit, using loops.
This commit is contained in:
parent
cb8f3291d3
commit
231369fa01
1 changed files with 3 additions and 4 deletions
|
@ -667,10 +667,9 @@ statics: {
|
|||
// Subdivide both curves, and see if they intersect.
|
||||
var v1s = Curve.subdivide(v1),
|
||||
v2s = Curve.subdivide(v2);
|
||||
this._addIntersections(v1s[0], v2s[0], curve, locations);
|
||||
this._addIntersections(v1s[0], v2s[1], curve, locations);
|
||||
this._addIntersections(v1s[1], v2s[0], curve, locations);
|
||||
this._addIntersections(v1s[1], v2s[1], curve, locations);
|
||||
for (var i = 0; i < 2; i++)
|
||||
for (var j = 0; j < 2; j++)
|
||||
this._addIntersections(v1s[i], v2s[j], curve, locations);
|
||||
}
|
||||
}
|
||||
return locations;
|
||||
|
|
Loading…
Reference in a new issue