@technobuddha > library > Geometry > Angle
Function: toDegrees()
ts
function toDegrees(angle: number, options: UnitOptions): number;Defined in: to-degrees.ts:16
Convert an angle from radians to degrees
Parameters
| Parameter | Type | Description |
|---|---|---|
angle | number | Angle |
options | UnitOptions | see UnitOptions |
Returns
number
angle in degrees
Example
typescript
toDegrees(Math.PI); // 180
toDegrees(1, 'turns'); // 360