atanv(var x)
atan2v(var a,var b)
Arc tangent function - the opposite of the
tanv
function,
returns an angle for a given tangent value.
Parameters:
x - direct tangent value.
a,b - the tangent value is a/b; useful for higher precision
when a is a sin and b a cos.
Returns:
Angle in degrees (-180 ... 180).
Speed:
FastRemarks:
-
For maintaining compatibility both to standard-C and to the old C-Script language, the atan and atan2 functions are overloaded under lite-C. When called with a var or int argument, they behave like atanv(), using degrees; when called with a float or double argument, they behave like the standard C/C++ atan() function, using radians. For enforcing the use of radians regardless of the argument type, use the (float) cast operator.
-
For learning about trigonometric functions see Trigonometry.
Example:
x = atanv(0); // x is 180
x = atanv(57.289); // x is 88.999
See also:
Trigonometry, sinv, cosv, tanv, asinv, acosv, atanv
► latest
version online