for 0.0.1
Show:

# Quaternion Class

Represents a Quaternion, a way to describe a spatial rotation that is less susceptible to gimbal lock.

This class extends the one from Three.js, API available here : http://threejs.org/docs/#Reference/Math/Quaternion

## Methods

()

Quaternion

()

Quaternion

(
• `q`
)

Quaternion

### `equals`

(
• `v`
)

Compares each component of v to each component of this quaternion to determine if they represent the same rotation.

Boolean

### `fromArray`

(
• `array`
)

Sets this quaternion's component values from an array.

#### Parameters:

• `array` Array

Quaternion

()

Quaternion

()

Float

()

Float

(
• `b`
)

Quaternion

(
• `a`
• `b`
)

Quaternion

### `multiplyVector3`

(
• `vector`
• `dest`
)

Quaternion

()

Quaternion

### `set`

(
• `x`
• `y`
• `z`
• `w`
)

#### Parameters:

• `x` Float
• `y` Float
• `z` Float
• `w` Float

Quaternion

### `setFromAxisAngle`

(
• `axis`
• `angle`
)

#### Parameters:

• `axis` Vector3
• `angle` Float

Quaternion

### `setFromEuler`

(
• `euler`
)

#### Parameters:

• `euler` Euler

Quaternion

(
• `m`
)

Quaternion

### `setFromUnitVectors`

(
• `vFrom`
• `vTo`
)

Quaternion

### `slerp`

(
• `quaternionB`
• `t`
)

Handles the spherical linear interpolation between quaternions. t represents the amount of rotation between this quaternion (where t is 0) and quaternionB (where t is 1). This quaternion is set to the result. Also see the static version of the slerp below.

#### Parameters:

• `quaternionB` Quaternion
• `t` Float

Quaternion

### `toArray`

(
• `array`
)

Returns the numerical elements of this quaternion in an array of format (x, y, z, w).

#### Parameters:

• `array` Array

Array