Inverse Tan?
MY PROBLEM IN A NUTSHELL:
Does any one know how to find the inverse tan, in radians or degrees? (I can convert between the two)
IF YOU NEED COMPLEX DETAIL:
I have an object that''s supposed to move at an angle above the EAST axis. I have the change in ''y'' distance and change in ''x'' distance of the movement, so I can easily get the tan ratio of theta angle as y/x, but I need to convert this to degrees so I can find the resultant velocity''s components (the x and y velocities):
y = magnitude*sin(theta)
x = magnitude*cos(theta)
No, Canadians DON'T all live in igloos. They live in one BIG igloo!
Okay, it says atan2() calculates the arctangent of y/x; is this the angle in radians?
No, Canadians DON'T all live in igloos. They live in one BIG igloo!
The Ansi C function
double atan(double m)
takes the gradient m of a line and returns an angle between (-PI/2,+PI/2). It is not particularly well behaved near the boundaries.
The Ansi C function
double atan2(double y, double x)
takes the values of the orthogonal displacements x and y and returns an angle between (-PI,PI]. It is well behaved near -PI/2 and PI/2.
These functions are implemented in this form in many maths packages for other languages.
Regards,
Timkin
double atan(double m)
takes the gradient m of a line and returns an angle between (-PI/2,+PI/2). It is not particularly well behaved near the boundaries.
The Ansi C function
double atan2(double y, double x)
takes the values of the orthogonal displacements x and y and returns an angle between (-PI,PI]. It is well behaved near -PI/2 and PI/2.
These functions are implemented in this form in many maths packages for other languages.
Regards,
Timkin
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement