xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

RtoD()

Converts angles from radians to degrees.

Syntax

RtoD( <nRadians> ) --> nDegrees

Arguments

<nRadians>
A numeric value specifies the radians as a fraction (or multiple) of Pi().

Return

The numeric return value is the angle in degrees (one full circle = 360 degrees).

Info

See also:DtoR()
Category: CT:Math , Mathematical functions , Trigonometric functions
Source:ct\trig.c
LIB:xhb.lib
DLL:xhbdll.dll

Example

// the example displays fractions of Pi in degrees
   PROCEDURE Main
      ? RtoD(   0     )   // result:    0.00
      ? RtoD(  Pi()/8 )   // result:   22.50
      ? RtoD(  Pi()/6 )   // result:   30.00
      ? RtoD(  Pi()/4 )   // result:   45.00
      ? RtoD(  Pi()/2 )   // result:   90.00
      ? RtoD(  Pi()   )   // result:  180.00
   RETURN

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