Crossing detection: Revert boundary checks

Adjust ambiguous edge case test instead
This commit is contained in:
Jürg Lehni 2019-06-23 10:26:47 +02:00
parent b51a4bed57
commit 7f496408b5
2 changed files with 3 additions and 3 deletions

View file

@ -460,9 +460,9 @@ var CurveLocation = Base.extend(/** @lends CurveLocation# */{
function isInRange(angle, min, max) {
return min < max
? angle > min && angle <= max
? angle > min && angle < max
// min > max: the range wraps around -180 / 180 degrees
: angle > min || angle <= max;
: angle > min || angle < max;
}
if (!t1Inside) {

View file

@ -201,7 +201,7 @@ test('#1073#issuecomment-234305530', function() {
true]);
testIntersections(path1.getIntersections(path2), [
{ point: { x: 426.61172, y: 448 }, index: 0, time: 0.27769, crossing: true },
{ point: { x: 376, y: 480 }, index: 1, time: 0, crossing: true },
{ point: { x: 376, y: 480 }, index: 1, time: 0, crossing: false },
{ point: { x: 343.68011, y: 469.7389 }, index: 1, time: 0.77843, crossing: true },
{ point: { x: 336.40125, y: 463.59875 }, index: 2, time: 0.00608, crossing: true }
]);