Computes a vector perpendicular to a 4D vector.
XMVECTOR XMVector4Orthogonal(
XMVECTOR V
)
V
Type: XMVECTOR
4D vector.
Type: XMVECTOR
Returns the 4D vector orthogonal to V.
A 4D cross-product is not well-defined. This function computes a generalized ‘cross-product’ for 4D vectors. XMVector4Cross is another geometric ‘cross-product’ for 4D vectors.
The following pseudocode demonstrates the operation of the function:
XMVECTOR Result;
Result.x = V.z;
Result.y = V.w;
Result.z = -V.x;
Result.w = -V.y;
return Result;
Header: Declared in directxmath.h.