From 0d39c4377d8616a7c9aea8f5bf40077abb8fa88b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Sat, 7 Dec 2013 16:30:40 +0100 Subject: [PATCH] Define test for issue #344 --- test/tests/Point.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/tests/Point.js b/test/tests/Point.js index b0ac6e97..9ad47e4b 100644 --- a/test/tests/Point.js +++ b/test/tests/Point.js @@ -91,6 +91,14 @@ test('set angle & length', function() { comparePoints(point2, point1); }); +test('getting angle after x / y change', function() { + var vector = new Point(1, 0); + equals(vector.angle, 0, 'angle before x / y change'); + vector.x = 0; + vector.y = 1; + equals(vector.angle, 90, 'angle after x / y change'); +}); + test('getDirectedAngle(point)', function() { equals(function() { return new Point(10, 10).getDirectedAngle(new Point(1, 0));