Clean up code a bit.

This commit is contained in:
Jürg Lehni 2013-10-08 20:49:24 +02:00
parent 367aa8ea28
commit 0860cdd941

View file

@ -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));
}
}