• Advertisement
Sign in to follow this  

Calculating angle from two co-ordinates

This topic is 4169 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

First off, an angle is something you have between two directions, not between two points.

However, I assume that you want the angle between the direction of the x-axis and the direction between the points. This is easy, if you program in c/c++ or similiar there is a function called atan2() which takes the difference in y as its first parameter and the difference in x as its second. It returns the angle in radians (between -pi and pi) (1 radian=180/pi degrees).

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement