TAN()
Tangent of the argument
Syntax
TAN( nRadiant ) -> nTangent
Arguments
<nRadiant> an angle size given in radiants
Returns
<nTangent> the tangent of <nRadiant>
Description
The function TAN() calculates the tangent of an angle whose size is given in radiants (full angle equals 2*Pi – see DTOR() for angle size given in degress). A common geometric interpretation of the TAN() function is the counterkathede-ankathede-ratio of a right-angled triangle, or, tan(x) = sin(x)/cos(x).
Examples
? tan( 0.0 ) // --> 0.0 ? tan( 1.0 ) // --> 1.5574...
Tests
tan( 0.0 ) == 0.0 tan( PI() / 4 ) == 1 tan( PI() ) == 0.0
Compliance
TAN() is compatible with CT3’s TAN().
Platforms
All
Files
Source is trig.c, library is libct.
Seealso
SIN(), COS(), COT(), ASIN(), ACOS(), ATAN(), ATN2(), SINH(), COSH(), TANH(), RTOD(), DTOR(), PI()