Internal Float32Array storage for quaternion components
Readonly
classThe class name identifier
The w component (real quaternion basis) - mutable
The x component (i quaternion basis) - mutable
The y component (j quaternion basis) - mutable
The z component (k quaternion basis) - mutable
Adds another quaternion to this one in place.
The quaternion to add
This quaternion for method chaining
Sets this quaternion to represent a rotation around an axis by a given angle.
The axis of rotation (should be normalized)
The angle of rotation in radians
This quaternion for method chaining
Creates a mutable copy of this quaternion.
A new mutable quaternion with the same values
Creates a mutable copy of this quaternion.
A new mutable quaternion with the same values
Copies the components from another quaternion into this one.
The source quaternion to copy from
This quaternion for method chaining
Divides this quaternion by a scalar value in place.
The scalar value to divide by
This quaternion for method chaining
Calculates the dot product between this quaternion and another.
The other quaternion
The dot product result
Sets this quaternion from a rotation matrix.
The source rotation matrix
This quaternion for method chaining
Sets this quaternion to the identity quaternion (0, 0, 0, 1).
This quaternion for method chaining
Compares this quaternion with another quaternion for equality within a tolerance.
The quaternion to compare with
Optional
delta: numberOptional tolerance value for comparison (default uses system epsilon)
True if quaternions are equal within tolerance, false otherwise
Compares this quaternion with another quaternion for strict equality.
The quaternion to compare with
True if quaternions are exactly equal, false otherwise
Multiplies this quaternion by another quaternion in place (quaternion composition).
The quaternion to multiply with
This quaternion for method chaining
Multiplies this quaternion by a scalar value in place.
The scalar value to multiply by
This quaternion for method chaining
Normalizes this quaternion to unit length in place.
This quaternion for method chaining
Gets the raw typed array backing this quaternion.
The underlying TypedArray storage
Sets the component value at the specified index.
Index (0=x, 1=y, 2=z, 3=w)
The value to set
This quaternion for method chaining
Sets all four components of the quaternion.
The x component value
The y component value
The z component value
The w component value
This quaternion for method chaining
Subtracts another quaternion from this one in place.
The quaternion to subtract
This quaternion for method chaining
Converts the quaternion to Euler angles and stores the result in the provided vector.
The output vector to store the Euler angles
The output vector containing Euler angles (x=pitch, y=yaw, z=roll)
Transforms a 3D vector by this quaternion rotation and stores the result in the output vector.
The vector to transform
The output vector to store the result
The output vector containing the transformed result
Mutable quaternion interface that extends IQuaternion with modification capabilities. Provides methods to modify quaternion components and perform in-place operations.