B.Math.Angles()

Represents canonical Euler angles.

To create the object use B.Math.makeAngles().

METHODS:

clone()

Clones this angles to a new angles object.

RETURNS:

{B.Math.Angles}

this

copy(angles)

Copies a given angles object into this angles.

PARAMETERS:

{B.Math.Angles} angles

RETURNS:

{B.Math.Angles}

this

set(yaw, pitch, roll)

Sets all elements and performs canonization.

PARAMETERS:

{number} yaw

{number} pitch

{number} roll

RETURNS:

{B.Math.Angles}

this

get(index)

Gets an element by its index.

PARAMETERS:

{number} index

RETURNS:

{number}

THROWS:

{Error}

if the index is out of range

yaw(angle)

Sets yaw angle (rotation around global Y-axis) and performs canonization. Range: [-PI, PI].

PARAMETERS:

{number} angle

RETURNS:

{B.Math.Angles}

this

yaw()

Gets yaw angle (rotation around global Y-axis). Range: [-PI, PI].

RETURNS:

{number}

pitch(angle)

Sets pitch angle (rotation around local X-axis) and performs canonization. Range: [-PI/2, PI/2].

PARAMETERS:

{number} angle

RETURNS:

{B.Math.Angles}

this

pitch()

Gets pitch angle (rotation around local X-axis).

RETURNS:

{number}

roll(angle)

Sets roll angle (rotation around local Z-axis) and performs canonization. Range: [-PI, PI].

PARAMETERS:

{number} angle

RETURNS:

{B.Math.Angles}

this

roll()

Gets roll angle (rotation around local Z-axis).

RETURNS:

{number}

fromArray(array, offset)

Sets this angles from a part of array and performs canonization.

PARAMETERS:

{Array.<number>} array

{number} [offset] = 0

RETURNS:

{number}

new offset

toArray(array, offset)

Sets this angles to a part of array.

PARAMETERS:

{Array.<number>} array

{number} [offset] = 0

RETURNS:

{number}

new offset

fromRotationMatrix(matrix)

Sets this angles from any rotation matrix.

PARAMETERS:

RETURNS:

{B.Math.Angles}

this

fromQuaternion(q)

Sets this angles from a quaternion.

PARAMETERS:

RETURNS:

{B.Math.Angles}

this

equal(angles)

Checks for strict equality of this angles and another angles.

PARAMETERS:

{B.Math.Angles} angles

RETURNS:

{boolean}

METHODS: