Merge pull request #798 from iconexperience/Improve-clipConvexHullPart

Improve clipConvexHullPart()
This commit is contained in:
Jürg Lehni 2015-10-06 16:21:41 +02:00
commit 99d969e962

View file

@ -1593,7 +1593,9 @@ 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 (top ? qy >= threshold : qy <= threshold)
if (qy == threshold) {
return qx;
} else if (top ? qy > threshold : qy < threshold)
return px + (threshold - py) * (qx - px) / (qy - py);
px = qx;
py = qy;