[−][src]Function directx_math::XMQuaternionSlerp
pub fn XMQuaternionSlerp(Q0: FXMVECTOR, Q1: FXMVECTOR, t: f32) -> FXMVECTOR
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