mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-19 06:00:56 -05:00
Clean up code a bit.
This commit is contained in:
parent
367aa8ea28
commit
0860cdd941
1 changed files with 4 additions and 3 deletions
|
@ -1393,12 +1393,13 @@ new function() { // Scope for methods that require numerical integration
|
|||
var point = Curve.evaluate(vcr, t, 0);
|
||||
// We do have a point on the infinite line. Check if it falls on
|
||||
// the line *segment*.
|
||||
if (point.x >= 0 && point.x <= rl2x){
|
||||
// Interpolate for the parameter for the intersection on line
|
||||
if (point.x >= 0 && point.x <= rl2x) {
|
||||
// Interpolate the parameter for the intersection on line.
|
||||
var tl = point.x / rl2x,
|
||||
t1 = flip ? tl : t,
|
||||
t2 = flip ? t : tl;
|
||||
addLocation(locations, curve1, t1, Curve.evaluate(v1, t1, 0),
|
||||
addLocation(locations,
|
||||
curve1, t1, Curve.evaluate(v1, t1, 0),
|
||||
curve2, t2, Curve.evaluate(v2, t2, 0));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue