COS()
Cosine of the argument
Syntax
COS( nRadiant ) -> nCosine
Arguments
<nRadiant> an angle size given in radiants
Returns
<nCosine> the cosine of <nRadiant>
Description
The function COS() calculates the cosine 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 COS() function is the ankathede-hypotenuse-ratio of a right-angled triangle.
Examples
? cos( 0.0 ) // --> 1.0 ? cos( 1.0 ) // --> 0.5403...
Tests
cos( 0.0) == 1.0 cos( PI() / 4 ) == sqrt( 1 / 2 ) cos( PI() / 2 ) == 0.0 cos( PI() ) == -1.0
Compliance
COS() is compatible with CT3’s COS().
Platforms
All
Files
Source is trig.c, library is libct.
Seealso
SIN(), TAN(), COT(), ASIN(), ACOS(), ATAN(), ATN2(), SINH(), COSH(), TANH(), RTOD(), DTOR(), PI()
Pingback: Harbour All Functions – C | Viva Clipper !
Pingback: Harbour Math Functions | Viva Clipper !