Skip to content

Instantly share code, notes, and snippets.

@joeyklee
Created January 13, 2017 09:35
Show Gist options
  • Save joeyklee/50df973eb9748b2fc355bbf1df93799d to your computer and use it in GitHub Desktop.
Save joeyklee/50df973eb9748b2fc355bbf1df93799d to your computer and use it in GitHub Desktop.
Get angle in degrees between two points in Processing
float getAngle(float pX1,float pY1, float pX2,float pY2){
return atan2(pY2 - pY1, pX2 - pX1)* 180/ PI;
}
@joeyklee
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment