Quaternion is a 4 dimensional vector that is used to represent a rotation. It mainly exists to perform SLERP (spherical-linear interpolation) between two rotations. Multiplying quaternions also cheaply reproduces rotation sequences. However quaternions need to be often renormalized, or else they suffer from precision issues.
</description>
<tutorials>
</tutorials>
<demos>
</demos>
<methods>
<methodname="Quat">
<returntype="Quat">
</return>
<argumentindex="0"name="x"type="float">
</argument>
<argumentindex="1"name="y"type="float">
</argument>
<argumentindex="2"name="z"type="float">
</argument>
<argumentindex="3"name="w"type="float">
</argument>
<description>
</description>
</method>
<methodname="Quat">
<returntype="Quat">
</return>
<argumentindex="0"name="axis"type="Vector3">
</argument>
<argumentindex="1"name="angle"type="float">
</argument>
<description>
Returns a quaternion that will rotate around the given axis by the specified angle. The axis must be a normalized vector.
</description>
</method>
<methodname="Quat">
<returntype="Quat">
</return>
<argumentindex="0"name="from"type="Basis">
</argument>
<description>
Returns the rotation matrix corresponding to the given quaternion.
</description>
</method>
<methodname="cubic_slerp">
<returntype="Quat">
</return>
<argumentindex="0"name="b"type="Quat">
</argument>
<argumentindex="1"name="pre_a"type="Quat">
</argument>
<argumentindex="2"name="post_b"type="Quat">
</argument>
<argumentindex="3"name="t"type="float">
</argument>
<description>
</description>
</method>
<methodname="dot">
<returntype="float">
</return>
<argumentindex="0"name="b"type="Quat">
</argument>
<description>
Returns the dot product of two quaternions.
</description>
</method>
<methodname="inverse">
<returntype="Quat">
</return>
<description>
Returns the inverse of the quaternion.
</description>
</method>
<methodname="is_normalized">
<returntype="bool">
</return>
<description>
Returns whether the quaternion is normalized or not.
</description>
</method>
<methodname="length">
<returntype="float">
</return>
<description>
Returns the length of the quaternion.
</description>
</method>
<methodname="length_squared">
<returntype="float">
</return>
<description>
Returns the length of the quaternion, squared.
</description>
</method>
<methodname="normalized">
<returntype="Quat">
</return>
<description>
Returns a copy of the quaternion, normalized to unit length.
</description>
</method>
<methodname="slerp">
<returntype="Quat">
</return>
<argumentindex="0"name="b"type="Quat">
</argument>
<argumentindex="1"name="t"type="float">
</argument>
<description>
Perform a spherical-linear interpolation with another quaternion.