Skip to content

@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

ParameterTypeDescription
anglenumberAngle
optionsUnitOptionssee UnitOptions

Returns

number

angle in degrees

Example

typescript
toDegrees(Math.PI); // 180
toDegrees(1, 'turns'); // 360