xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

ATan()

Calculates the arc tangent.

Syntax

ATan( <nRadians> ) --> nArcTangent

Arguments

<nRadians>
A numeric value specifying the angle tangent value in radians.

Return

The function returns the arc tangent as a numeric value between plus/minus Pi()/2.

Info

See also:ACos(), ASin(), 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 ATan().

   PROCEDURE Main
      ? Str( ATan( -1.0 ), 18, 15)  // result: -0.785398163397449
      ? Str( ATan( -0.5 ), 18, 15)  // result: -0.463647609000806
      ? Str( ATan(    0 ), 18, 15)  // result:  0.000000000000000
      ? Str( ATan(  0.5 ), 18, 15)  // result:  0.463647609000806
      ? Str( ATan(  1.0 ), 18, 15)  // result:  0.785398163397449
   RETURN

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