Click or drag to resize

DToR Function

X#
Converts degrees to radians.

Namespace:  XSharp.RT
Assembly:  XSharp.RT (in XSharp.RT.dll) Version: 2.19
Syntax
 FUNCTION DToR(
	nExpression AS USUAL
) AS REAL8
Request Example View Source

Parameters

nExpression
Type: Usual
Specifies the numeric expression whose value you want to convert to radians. An angle expressed in a degree:minute:second format should be converted to its decimal equivalent.

Return Value

Type: Double
Numeric
Remarks
DTOR( ) converts the value of a numeric expression given in degrees to an equivalent value in radians. DTOR( ) is useful for working with the X# trigonometric functions: ACOS( ), ASIN( ), COS( ), SIN( ), TAN( ). Use RTOD( ) to convert radians to degrees.
Examples
 
X#
1CLEAR
2? DTOR(0)  // Displays 0.00
3? DTOR(45) // Displays 0.79
4? DTOR(90) // Displays 1.57
5? DTOR(180)  // Displays 3.14
6? COS(DTOR(90))  // Displays 0.00
See Also