COS()

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()

Advertisements

2 responses to “COS()

  1. Pingback: Harbour All Functions – C | Viva Clipper !

  2. Pingback: Harbour Math Functions | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s