xHarbour Reference Documentation > Function Reference |
Converts an angle from degrees to radians.
DtoR( <nDegrees> ) --> nRadians
The numeric return value is the angle in radians.
See also: | RtoD() |
Category: | CT:Math , Conversion functions , Mathematical functions , Trigonometric functions |
Source: | ct\trig.c |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
// The example displays results of function DtoR(). PROCEDURE Main ? DtoR( 0 ) // result: 0.00 ? DtoR( 45 ) // result: 0.79 ? DtoR( 60 ) // result: 1.05 ? DtoR( 90 ) // result: 1.57 (qtr. circle = Pi()/2) ? DtoR( 120 ) // result: 2.09 ? DtoR( 180 ) // result: 3.14 (half circle = Pi()) ? DtoR( 240 ) // result: 4.19 ? DtoR( 300 ) // result: 5.24 ? DtoR( 360 ) // result: 6.28 (full circle=2*Pi()) RETURN
http://www.xHarbour.com