mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2024-12-29 09:22:22 -05:00
Define test for issue #344
This commit is contained in:
parent
a837bbb2f6
commit
0d39c4377d
1 changed files with 8 additions and 0 deletions
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue