mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-06 04:42:15 -05:00
Rewrite 04cab797db
to only use one return statement.
This commit is contained in:
parent
99d969e962
commit
1b343d5347
1 changed files with 4 additions and 4 deletions
|
@ -1593,10 +1593,10 @@ new function() { // Scope for intersection using bezier fat-line clipping
|
|||
for (var i = 1, l = part.length; i < l; i++) {
|
||||
var qx = part[i][0],
|
||||
qy = part[i][1];
|
||||
if (qy == threshold) {
|
||||
return qx;
|
||||
} else if (top ? qy > threshold : qy < threshold)
|
||||
return px + (threshold - py) * (qx - px) / (qy - py);
|
||||
if (top ? qy >= threshold : qy <= threshold) {
|
||||
return qy === threshold ? qx
|
||||
: px + (threshold - py) * (qx - px) / (qy - py);
|
||||
}
|
||||
px = qx;
|
||||
py = qy;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue