XMVector3Cross

Computes the cross product between two 3D vectors.

Syntax

XMVECTOR XMVector3Cross(
         XMVECTOR V1,
         XMVECTOR V2
)  

Parameters

V1
Type: XMVECTOR 

3D vector.

V2
Type: XMVECTOR 

3D vector.

Return value

Type: XMVECTOR 

Returns the cross product of V1 and V2.

Remarks

The following pseudocode demonstrates the operation of the function:

XMVECTOR Result;
Result.x = (V1.y * V2.z) - (V1.z * V2.y);
Result.y = (V1.z * V2.x) - (V1.x * V2.z);
Result.z = (V1.x * V2.y) - (V1.y * V2.x);
Result.w = 0;
return Result;  

Requirements

Header: Declared in directxmath.h.