Skip to content
This repository has been archived by the owner on Dec 5, 2018. It is now read-only.

Commit

Permalink
Closes #168 : Added unit tests for PVector.angleBetween
Browse files Browse the repository at this point in the history
  • Loading branch information
viamodulo committed Mar 27, 2015
1 parent 66d551e commit 4472bcc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/unit/PVector.pde
Expand Up @@ -39,6 +39,14 @@ PVector v2 = new PVector(60, 80);
float a = PVector.angleBetween(v1, v2);
_checkEqual(degrees(a), 10.304846, round_tolerance);

v1 = new PVector(2, 3);
a = PVector.angleBetween(v1, v1);
_checkEqual(a, 0, round_tolerance);

v1 = new PVector(2, 4);
a = PVector.angleBetween(v1, v1);
_checkEqual(a, 0, round_tolerance);

// CROSS
PVector v1 = new PVector(10, 20, 2);
PVector v2 = new PVector(60, 80, 6);
Expand Down

0 comments on commit 4472bcc

Please sign in to comment.