mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2024-12-28 17:02:24 -05:00
Crossing detection: Revert boundary checks
Adjust ambiguous edge case test instead
This commit is contained in:
parent
b51a4bed57
commit
7f496408b5
2 changed files with 3 additions and 3 deletions
|
@ -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) {
|
||||
|
|
|
@ -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 }
|
||||
]);
|
||||
|
|
Loading…
Reference in a new issue