Companion

object Companion

The companion object of Quat.

Functions

Link copied to clipboard
@JvmStatic
fun dot(a: Quat, b: Quat): Float

Calculates the dot product (scalar product) of two quaternions, a and b.

Link copied to clipboard
@JvmStatic
fun identity(): Quat

Gets the Quat instance that represents the identify.

Link copied to clipboard
@JvmStatic
fun nlerp(start: Quat, endInput: Quat, tOriginal: Float): Quat

Performs Normalized Linear Interpolation (Nlerp) between two quaternions, start and endInput, using the interpolation factor tOriginal. This method is suitable for efficiently interpolating 3D rotations.

Link copied to clipboard
@JvmStatic
fun slerp(start: Quat, endInput: Quat, tOriginal: Float): Quat

Performs Spherical Linear Interpolation (Slerp) between two quaternions, start and endInput, by an interpolant tOriginal. Slerp provides smooth interpolation of rotations with constant angular velocity along the shortest path on the 4D unit sphere.

Link copied to clipboard
@JvmStatic
fun slerpLongPath(start: Quat, endInput: Quat, tOriginal: Float): Quat

Performs Spherical Linear Interpolation (Slerp) between two quaternions, start and endInput, by an interpolant tOriginal, ensuring that the interpolation takes the long path if a shorter rotational path exists.