[][src]Function directx_math::XMVectorRotateLeft

pub fn XMVectorRotateLeft(V: FXMVECTOR, Elements: u32) -> XMVECTOR

Rotates the vector left by a given number of 32-bit elements.

Parameters

V Vector to rotate left.

Elements Number of 32-bit elements by which to rotate V left. This parameter must be 0, 1, 2, or 3.

Return value

Returns the rotated XMVECTOR.

Remarks

The following code demonstrates how this function may be used.

XMVECTOR v = XMVectorSet( 10.0f, 20.0f, 30.0f, 40.0f );
XMVECTOR result = XMVectorRotateLeft( v, 1 );

The rotated vector (result) will be <40.0, 10.0, 20.0, 30.0>.

In the case of a constant rotate value, it is more efficient to use the template form of XMVectorRotateRight:

Reference

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