The X component.
The Y component.
The Z component.
An immutable Quaternion instance initialized to (0.0, 0.0, 0.0, 1.0).
An immutable Quaternion instance initialized to (0.0, 0.0, 0.0, 0.0).
The number of elements used to store the object into an array in its interpolatable form.
The number of elements used to pack the object into an array.
Duplicates this Quaternion instance.
The modified result parameter or a new Quaternion instance if one was not provided.
Compares this and the provided quaternion componentwise and returns
true
if they are equal, false
otherwise.
true
if left and right are equal, false
otherwise.
Compares this and the provided quaternion componentwise and returns
true
if they are within the provided epsilon,
false
otherwise.
true
if left and right are within the provided epsilon, false
otherwise.
Returns a string representing this quaternion in the format (x, y, z, w).
A string representing this Quaternion.
Computes the componentwise sum of two quaternions.
The first quaternion.
The second quaternion.
The object onto which to store the result.
The modified result parameter.
Duplicates a Quaternion instance.
The quaternion to duplicate.
The modified result parameter or a new Quaternion instance if one was not provided. (Returns undefined if quaternion is undefined)
Computes the angle of rotation of the provided quaternion.
The quaternion to use.
The angle of rotation.
Computes the axis of rotation of the provided quaternion.
The quaternion to use.
The object onto which to store the result.
The modified result parameter.
Computes an inner quadrangle point.
This will compute quaternions that ensure a squad curve is C1.
The first quaternion.
The second quaternion.
The third quaternion.
The object onto which to store the result.
The modified result parameter.
Computes the conjugate of the provided quaternion.
The quaternion to conjugate.
The object onto which to store the result.
The modified result parameter.
Converts a packed array into a form suitable for interpolation.
The packed array.
Divides the provided quaternion componentwise by the provided scalar.
The quaternion to be divided.
The scalar to divide by.
The object onto which to store the result.
The modified result parameter.
Computes the dot (scalar) product of two quaternions.
The first quaternion.
The second quaternion.
The dot product.
Compares the provided quaternions componentwise and returns
true
if they are equal, false
otherwise.
true
if left and right are equal, false
otherwise.
Compares the provided quaternions componentwise and returns
true
if they are within the provided epsilon,
false
otherwise.
true
if left and right are within the provided epsilon, false
otherwise.
The exponential quaternion function.
The cartesian.
The object onto which to store the result.
The modified result parameter.
Computes the spherical linear interpolation or extrapolation at t using the provided quaternions. This implementation is faster than {@link Quaternion#slerp}, but is only accurate up to 10-6.
The value corresponding to t at 0.0.
The value corresponding to t at 1.0.
The point along t at which to interpolate.
The object onto which to store the result.
The modified result parameter.
Computes the spherical quadrangle interpolation between quaternions. An implementation that is faster than {@link Quaternion#squad}, but less accurate.
The first quaternion.
The second quaternion.
The first inner quadrangle.
The second inner quadrangle.
The time in [0,1] used to interpolate.
The object onto which to store the result.
The modified result parameter or a new instance if none was provided.
Computes a quaternion representing a rotation around an axis.
The axis of rotation.
The angle in radians to rotate around the axis.
The modified result parameter or a new Quaternion instance if one was not provided.
Computes a rotation from the given heading, pitch and roll angles. Heading is the rotation about the negative z axis. Pitch is the rotation about the negative y axis. Roll is the rotation about the positive x axis.
The rotation expressed as a heading, pitch and roll.
The modified result parameter or a new Quaternion instance if none was provided.
Computes a Quaternion from the provided Matrix3 instance.
The rotation matrix.
The modified result parameter or a new Quaternion instance if one was not provided.
Computes the inverse of the provided quaternion.
The quaternion to normalize.
The object onto which to store the result.
The modified result parameter.
Computes the linear interpolation or extrapolation at t using the provided quaternions.
The value corresponding to t at 0.0.
The value corresponding to t at 1.0.
The point along t at which to interpolate.
The object onto which to store the result.
The modified result parameter.
The logarithmic quaternion function.
The unit quaternion.
The object onto which to store the result.
The modified result parameter.
Computes magnitude for the provided quaternion.
The quaternion to conjugate.
The magnitude.
Computes magnitude squared for the provided quaternion.
The quaternion to conjugate.
The magnitude squared.
Computes the product of two quaternions.
The first quaternion.
The second quaternion.
The object onto which to store the result.
The modified result parameter.
Multiplies the provided quaternion componentwise by the provided scalar.
The quaternion to be scaled.
The scalar to multiply with.
The object onto which to store the result.
The modified result parameter.
Negates the provided quaternion.
The quaternion to be negated.
The object onto which to store the result.
The modified result parameter.
Computes the normalized form of the provided quaternion.
The quaternion to normalize.
The object onto which to store the result.
The modified result parameter.
Stores the provided instance into the provided array.
The value to pack.
The array to pack into.
The array that was packed into
Computes the spherical linear interpolation or extrapolation at t using the provided quaternions.
The value corresponding to t at 0.0.
The value corresponding to t at 1.0.
The point along t at which to interpolate.
The object onto which to store the result.
The modified result parameter.
Computes the spherical quadrangle interpolation between quaternions.
The first quaternion.
The second quaternion.
The first inner quadrangle.
The second inner quadrangle.
The time in [0,1] used to interpolate.
The object onto which to store the result.
The modified result parameter.
Computes the componentwise difference of two quaternions.
The first quaternion.
The second quaternion.
The object onto which to store the result.
The modified result parameter.
Retrieves an instance from a packed array.
The packed array.
The modified result parameter or a new Quaternion instance if one was not provided.
Retrieves an instance from a packed array converted with convertPackedArrayForInterpolation.
The array previously packed for interpolation.
The original packed array.
The modified result parameter or a new Quaternion instance if one was not provided.
The W component.