tan(float x)
tanv(var x)
Tangent function.Parameters:
x -
angle in degrees (tanv) or radians (tan).
Returns:
Tangent of angle x.
Speed:
Fast
Remarks:
-
For maintaining compatibility both to standard-C and to the old C-Script language, the tan function is overloaded under lite-C. When called with a var or int argument, it behaves like tanv(), using degrees; when called with a float or double argument, it behaves like the standard C/C++ tan() 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 = tanv(180); // x is 0
x = tanv(89); // x is 57.289
x = atanv(0.707) // x is 35.26
See also:
Trigonometry, sinv, cosv, tanv, asinv, acosv, atanv► latest
version online