Rotates the vector right by a given number of 32-bit elements.
| Name | Description |
|---|---|
| XMVectorRotateRight (XMVECTOR) | Rotates the vector right by a given number of 32-bit elements. |
| XMVectorRotateRight (XMVECTOR, uint32_t) | Rotates the vector right by a given number of 32-bit elements. |
The following code demonstrates how this function may be used.
XMVECTOR v = XMVectorSet( 10.0f, 20.0f, 30.0f, 40.0f );
XMVECTOR result = XMVectorRotateRight( v, 1 );
The rotated vector (result) will be <40.0f, 10.0f, 20.0f, 30.0f>.
In the case of a constant rotate value, it is more efficient to use the template form of XMVectorRotateRight:
template<uint32_t Elements>
XMVECTOR XMVectorRotateRight(FXMVECTOR V)