Computes the cross product between two 3D vectors.
XMVECTOR XMVector3Cross(
XMVECTOR V1,
XMVECTOR V2
)
V1
Type: XMVECTOR
3D vector.
V2
Type: XMVECTOR
3D vector.
Type: XMVECTOR
Returns the cross product of V1 and V2.
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;
Header: Declared in directxmath.h.