Rewrite 04cab797db to only use one return statement.

This commit is contained in:
Jürg Lehni 2015-10-06 16:31:30 +02:00
parent 99d969e962
commit 1b343d5347

View file

@ -1593,10 +1593,10 @@ new function() { // Scope for intersection using bezier fat-line clipping
for (var i = 1, l = part.length; i < l; i++) { for (var i = 1, l = part.length; i < l; i++) {
var qx = part[i][0], var qx = part[i][0],
qy = part[i][1]; qy = part[i][1];
if (qy == threshold) { if (top ? qy >= threshold : qy <= threshold) {
return qx; return qy === threshold ? qx
} else if (top ? qy > threshold : qy < threshold) : px + (threshold - py) * (qx - px) / (qy - py);
return px + (threshold - py) * (qx - px) / (qy - py); }
px = qx; px = qx;
py = qy; py = qy;
} }