Arctan alternative for finding angle of vector from....

jdm2104

New member
Joined
Jan 24, 2008
Messages
1
Hi there,

Could you tell me if there is an alternative method for finding the angle of a vector from X and Y coordinates?

For example, I would like an alternative to:

theta = atan(y / x)

Thank you.
 
jdm2104 said:
Hi there,

Could you tell me if there is an alternative method for finding the angle of a vector from X and Y coordinates?

For example, I would like an alternative to:

theta = atan(y / x)

Thank you.
You could calculate

\(\displaystyle r\, = \, \sqrt{x^2 + y^2}\)

And use 'r' and either 'x' or 'y' to find arcsin or arccos.

However, be cognizant of the respective domains of those functions. In general, arctan is more accurate.
 
Top