XMConvertFloatToHalfStream
XMConvertHalfToFloatStream
XMMatrixDecompose
XMPlaneTransformStream
XMVector2TransformCoordStream
XMVector2TransformNormalStream
XMVector2TransformStream
XMVector3ProjectStream
XMVector3TransformCoordStream
XMVector3TransformNormalStream
XMVector3TransformStream
XMVector3UnprojectStream
XMVector4TransformStream
Expand Minimize

XMVectorRotateRight method

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

Syntax


XMVECTOR XMVectorRotateRight(
  [in]  XMVECTOR V,
  [in]  uint32_t Elements
);

Parameters

V [in]

Vector to rotate right.

Elements [in]

Number of 32-bit elements by which to rotate V right. 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 = 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)
   

Platform Requirements

Microsoft Visual Studio 2010 or Microsoft Visual Studio 2012 with the Windows SDK for Windows 8. Supported for Win32 desktop apps, Windows Store apps, and Windows Phone 8 apps.

Requirements

Namespace

Use DirectX.

Header

DirectXMath.h

See also

XMVectorPermute
XMVectorRotateLeft
XMVectorShiftLeft

 

 

Community Additions

ADD
Show:
© 2014 Microsoft