Freigeben über


XMVectorModAngles-Funktion (directxmath.h)

Berechnet das Winkelmodulo 2PI pro Komponente.

Syntax

XMVECTOR XM_CALLCONV XMVectorModAngles(
  [in] FXMVECTOR Angles
) noexcept;

Parameter

[in] Angles

Vektor von Winkelkomponenten.

Rückgabewert

Gibt einen Vektor zurück, dessen Komponenten die entsprechenden Komponenten von Angles modulo 2PI sind.

Hinweise

Der folgende Pseudocode veranschaulicht den Betrieb der Funktion:

XMVECTOR result;

result.x = Angles.x - XM_2PI * round( Angles.x / XM_2PI );
result.y = Angles.y - XM_2PI * round( Angles.y / XM_2PI );
result.z = Angles.z - XM_2PI * round( Angles.z / XM_2PI );
result.w = Angles.w - XM_2PI * round( Angles.w / XM_2PI );

return result;

Plattformanforderungen

Microsoft Visual Studio 2010 oder Microsoft Visual Studio 2012 mit dem Windows SDK für Windows 8. Unterstützt für Win32-Desktop-Apps, Windows Store-Apps und Windows Phone 8-Apps.

Anforderungen

Anforderung Wert
Zielplattform Windows
Kopfzeile directxmath.h (einschließlich DirectXMath.h)

Weitere Informationen

Vektorarithmetikfunktionen