Function XMQuaternionSlerp

Source
pub fn XMQuaternionSlerp(Q0: FXMVECTOR, Q1: FXMVECTOR, t: f32) -> FXMVECTOR
Expand description

Interpolates between two unit quaternions, using spherical linear interpolation.

§Parameters

Q0 Unit quaternion to interpolate from.

Q Unit quaternion to interpolate to.

t Interpolation control factor.

§Return value

Returns the interpolated quaternion. If Q0 and Q1 are not unit quaternions, the resulting interpolation is undefined.

§Remarks

The DirectXMath quaternion functions use an XMVECTOR 4-vector to represent quaternions, where the X, Y, and Z components are the vector part and the W component is the scalar part.

When t is 0.0, the function returns Q0. When t is 1.0, the function returns Q1.

§Reference

https://docs.microsoft.com/en-us/windows/win32/api/directxmath/nf-directxmath-XMQuaternionSlerp