XMVector4Orthogonal

Computes a vector perpendicular to a 4D vector.

Syntax

XMVECTOR XMVector4Orthogonal(
         XMVECTOR V
)  

Parameters

V
Type: XMVECTOR 

4D vector.

Return value

Type: XMVECTOR 

Returns the 4D vector orthogonal to V.

Remarks

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;  

Requirements

Header: Declared in directxmath.h.