xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

ACos()

Calculates the arc cosine.

Syntax

ACos( <nRadians> ) --> nArcCosine

Arguments

<nRadians>
A numeric value between -1 and +1 specifying the cosine in radians.

Return

The function returns the arc cosine as a numeric value between 0 and Pi().

Info

See also:ASin(), ATan(), ATn2(), DtoR(), RtoD(), SetPrec(), Sin(), Tan()
Category: CT:Math , Mathematical functions , Trigonometric functions
Source:ct\trig.c
LIB:xhb.lib
DLL:xhbdll.dll

Example

// The example displays results of function ACos().

   PROCEDURE Main
      ? Str( ACos( -1.0 ), 18, 15)  // result: 3.141592653589794
      ? Str( ACos( -0.5 ), 18, 15)  // result: 2.094395102393196
      ? Str( ACos(    0 ), 18, 15)  // result: 1.570796326794897
      ? Str( ACos(  0.5 ), 18, 15)  // result: 1.047197551196598
      ? Str( ACos(  1.0 ), 18, 15)  // result: 0.000000000000000
   RETURN

Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe