mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Fix tests for Point#getDirectedAngle(point).
This commit is contained in:
parent
c85ddf2abe
commit
5a601f39a4
1 changed files with 10 additions and 1 deletions
|
@ -64,6 +64,15 @@ test('set angle', function() {
|
|||
});
|
||||
|
||||
test('getDirectedAngle(point)', function() {
|
||||
var angle = new Point().getDirectedAngle(new Point(10, 10));
|
||||
var angle = new Point(10, 10).getDirectedAngle(new Point(1, 0));
|
||||
equals(angle, -45);
|
||||
|
||||
var angle = new Point(-10, 10).getDirectedAngle(new Point(1, 0));
|
||||
equals(angle, -135);
|
||||
|
||||
var angle = new Point(-10, -10).getDirectedAngle(new Point(1, 0));
|
||||
equals(angle, 135);
|
||||
|
||||
var angle = new Point(10, -10).getDirectedAngle(new Point(1, 0));
|
||||
equals(angle, 45);
|
||||
});
|
Loading…
Reference in a new issue