Sign in to follow this  

Calculating angle from two co-ordinates

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this