atan2 - returns arctangent of scalars and vectors.
vector1 atan2(vector1 y, vector1 x); vector2 atan2(vector2 y, vector2 x); vector3 atan2(vector3 y, vector3 x); vector4 atan2(vector4 y, vector4 x);
- Vector or scalar for numerator of ratio of which to determine the arctangent.
- Vector or scalar of denominator of ratio of which to determine the arctangent.
atan2 calculates the arctangent of y/x. atan2 is well defined for every point other than the origin, even if x equals 0 and y does not equal 0.
For vectors, the returned vector contains the arctangent of each element of the input vector.