Created
May 5, 2012 22:51
-
Star
(350)
You must be signed in to star a gist -
Fork
(41)
You must be signed in to fork a gist
-
-
Save conorbuck/2606166 to your computer and use it in GitHub Desktop.
Revisions
-
conorbuck revised this gist
May 5, 2012 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,6 +8,8 @@ var p2 = { y: 40 }; // angle in radians var angleRadians = Math.atan2(p2.y - p1.y, p2.x - p1.x); // angle in degrees var angleDeg = Math.atan2(p2.y - p1.y, p2.x - p1.x) * 180 / Math.PI; -
conorbuck created this gist
May 5, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ var p1 = { x: 20, y: 20 }; var p2 = { x: 40, y: 40 }; var angleRadians = Math.atan2(p2.y - p1.y, p2.x - p1.x); var angleDeg = Math.atan2(p2.y - p1.y, p2.x - p1.x) * 180 / Math.PI;