API Referenceatlasatlas/units
Radians
Angle stored in radians, with degree conversion and arithmetic returning new values.
Module: atlas/units
Angle stored in radians, with degree conversion and arithmetic returning new values.
Declaration
export class Radians { ... }Constructors
Creates a new radians.
constructor(value: number);Properties
value
The value.
value: number;Methods
add
Returns a new value by adding the operand.
add(other: Radians): Radians;subtract
Returns a new value by subtracting the operand.
subtract(other: Radians): Radians;multiply
Returns a new value by multiplying by the operand.
multiply(other: Radians | number): Radians;divide
Returns a new value by dividing by the operand.
divide(other: Radians | number): Radians;toNumber
Returns the stored numeric value.
toNumber(): number;fromDegrees
Creates a value from degrees.
static fromDegrees(degrees: number): Radians;toDegrees
To degrees.
toDegrees(): number;