Skip to content
reduz edited this page Apr 10, 2014 · 10 revisions

Quat

####Category: Built-In Types

Brief Description

Quaternion.

Member Functions

Member Variables

Description

Quaternion is a 4 dimensional vector that is used to represet a rotation. It mainly exists to perform SLERP (spherical-linear interpolation) between to rotations obtained by a Matrix3 cheaply. Adding quaternions also cheaply adds the rotations, however quaternions need to be often normalized, or else they suffer from precision issues.

Member Function Description

Returns the dot product between two quaternions.

Returns the inverse of the quaternion (applies to the inverse rotatio too).

Returns the length of the quaternion.

  • float length_squared ( )

Returns the length of the quaternion, minus the square root.

  • Quat normalized ( )

Returns a copy of the quaternion, normalized to unit length.

Perform a spherical-linear interpolation with another quaternion.

Clone this wiki locally