Expand description
A simple and type agnostic quaternion math library designed for reexporting
Functions§
- add
- Adds two quaternions.
- axis_
angle - Construct a quaternion for the given angle (in radians) about the given axis. Axis must be a unit vector.
- conj
- Takes the quaternion conjugate.
- dot
- Dot product of two quaternions
- euler_
angles - Construct a quaternion representing the given euler angle rotations (in radians)
- id
- Constructs identity quaternion.
- len
- Computes the length of a quaternion.
- mul
- Multiplies two quaternions.
- rotate_
vector - Rotate the given vector using the given quaternion
- rotation_
from_ to - Construct a quaternion representing the rotation from a to b
- scale
- Scales a quaternion (element-wise) by a scalar
- square_
len - Computes the square length of a quaternion.
Type Aliases§
- Quaternion
- Quaternion type alias.