diff --git a/test/tests/Point.js b/test/tests/Point.js index 448f4b2b..64a6a556 100644 --- a/test/tests/Point.js +++ b/test/tests/Point.js @@ -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); +});