Namespace: Utils

Utils

Source:

Methods

<static> clone(object) → {Object}

Returns a new object with all properties and methods of the old object copied to the new object's prototype.
Parameters:
Name Type Description
object Object The object to clone.
Source:
Returns:
An object.
Type
Object

<static> constrain(val, low, high) → {number}

Constrain a value within a range.
Parameters:
Name Type Description
val number The value to constrain.
low number The lower bound of the range.
high number The upper bound of the range.
Source:
Returns:
A number.
Type
number

<static> degreesToRadians(degrees) → {number}

Converts degrees to radians.
Parameters:
Name Type Description
degrees number The degrees value to be converted.
Source:
Returns:
A number in radians.
Type
number

<static> radiansToDegrees(radians) → {number}

Converts radians to degrees.
Parameters:
Name Type Description
radians number The radians value to be converted.
Source:
Returns:
A number in degrees.
Type
number