@technobuddha > library > Geometry > Angle
Function: toRadians()
ts
function toRadians(angle: number, options: UnitOptions): number;Defined in: to-radians.ts:17
Converts degrees to radians.
Parameters
| Parameter | Type | Description |
|---|---|---|
angle | number | Angle. |
options | UnitOptions | see UnitOptions |
Returns
number
Angle in radians.
Example
typescript
toRadians(180); // π
toRadians(90, 'degrees'); // π/2
toRadians(0.5, 'turns'); // π