Fonction XMVectorRotateLeft (directxmath.h)
Fait pivoter le vecteur vers la gauche d’un nombre donné d’éléments 32 bits.
XMVECTOR XM_CALLCONV XMVectorRotateLeft(
[in] FXMVECTOR V,
[in] uint32_t Elements
) noexcept;
[in] V
Vecteur à faire pivoter vers la gauche.
[in] Elements
Nombre d’éléments 32 bits par lesquels faire pivoter V vers la gauche. Ce paramètre doit être 0, 1, 2 ou 3.
Retourne le XMVECTOR pivoté.
Le code suivant montre comment cette fonction peut être utilisée.
XMVECTOR v = XMVectorSet( 10.0f, 20.0f, 30.0f, 40.0f );
XMVECTOR result = XMVectorRotateLeft( v, 1 );
Le vecteur pivoté (résultat) sera <20.0f, 30.0f, 40.0f, 10.0f>.
Dans le cas d’une valeur de rotation constante, il est plus efficace d’utiliser la forme de modèle de XMVectorRotateLeft :
template<uint32_t Elements>
XMVECTOR XMVectorRotateLeft(FXMVECTOR V)
Microsoft Visual Studio 2010 ou Microsoft Visual Studio 2012 avec le SDK Windows pour Windows 8. Pris en charge pour les applications de bureau Win32, les applications du Windows Store et les applications Windows Phone 8.
Plateforme cible | Windows |
En-tête | directxmath.h (inclure DirectXMath.h) |