Created
January 13, 2017 09:35
-
-
Save joeyklee/50df973eb9748b2fc355bbf1df93799d to your computer and use it in GitHub Desktop.
Get angle in degrees between two points in Processing
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 characters
float getAngle(float pX1,float pY1, float pX2,float pY2){ | |
return atan2(pY2 - pY1, pX2 - pX1)* 180/ PI; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
from: https://gist.github.com/conorbuck/2606166