mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Implement unit tests for Point#isOrthogonal()
This commit is contained in:
parent
87d0dc9ead
commit
78a107da65
1 changed files with 15 additions and 0 deletions
|
@ -145,3 +145,18 @@ test('isColinear()', function() {
|
|||
return new Point(10, 10).isColinear(new Point(10, -10));
|
||||
}, false);
|
||||
});
|
||||
|
||||
test('isOrthogonal()', function() {
|
||||
equals(function() {
|
||||
return new Point(10, 5).isOrthogonal(new Point(5, -10));
|
||||
}, true);
|
||||
equals(function() {
|
||||
return new Point(5, 10).isOrthogonal(new Point(-10, 5));
|
||||
}, true);
|
||||
equals(function() {
|
||||
return new Point(10, 10).isOrthogonal(new Point(20, 20));
|
||||
}, false);
|
||||
equals(function() {
|
||||
return new Point(10, 10).isOrthogonal(new Point(10, -20));
|
||||
}, false);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue