Template Function TRAP::Math::Mix(const tQuat<T>&, const tQuat<T>&, T)#

Function Documentation#

template<typename T>
constexpr tQuat<T> TRAP::Math::Mix(const tQuat<T> &x, const tQuat<T> &y, T a)#

Spherical linear interpolation of two quaternions. The interpolation is oriented and the rotation is performed at constant speed. For short path spherical linear interpolation, use the Slerp function.

Parameters:
  • x – A quaternion.

  • y – A quaternion.

  • a – Interpolation factor. The interpolation is defined beyond the range [0, 1].

Returns:

Spherical linear interpolation of two quaternions.