rad (JavaScript)

Converts degrees to radians.

Defined in

Math (JavaScript)

Syntax

rad(value:double) : double
Parameter Description
value A number of degrees.
Return value Description
double The value of the parameter in radians.

Usage

One radian equals 180 divided by pi, or approximately 57.29577 degrees.

Examples

This edit box is for the input of a number of degrees. Its onchange event changes the data value of another edit box to be the equivalent value in radians.
sessionScope.radians = Math.rad(sessionScope.degrees)