Function directx_math::XMVector3Cross[][src]

pub fn XMVector3Cross(V1: FXMVECTOR, V2: FXMVECTOR) -> FXMVECTOR

Computes the cross product between 3D vectors.

Parameters

V1 3D vector.

V2 3D vector.

Return value

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;

Reference

https://docs.microsoft.com/en-us/windows/win32/api/directxmath/nf-directxmath-XMVector3Cross