FUNCTIONS CORE

Cot()

Calculate the cotangent

Syntax

Signature
Cot( nAngle ) --> nCotangent

Arguments

nAngle

Example

Cot.prg
PROCEDURE Main()

   Check( 'Round( Cot( Pi() / 4 ), 6 ) ', Round( Cot( Pi() / 4 ), 6 ), 1 )
   Check( 'Round( Cot( Pi() / 2 ), 6 ) ', Round( Cot( Pi() / 2 ), 6 ), 0 )
   Check( 'Round( Cot( Pi() / 9 ), 6 ) ', Round( Cot( Pi() / 9 ), 6 ), 2.747477 )

RETURN

STATIC PROCEDURE Check( cTitle, xResult, xExpected )

   QOut( cTitle + IIF( xResult == xExpected, "OK", "ERROR" ) )

RETURN

Output

Round( Cot( Pi() / 4 ), 6 ) OK
Round( Cot( Pi() / 2 ), 6 ) OK
Round( Cot( Pi() / 9 ), 6 ) OK