This helper function returns the cross product of the specified vectors. CrossProduct is part of the suite of extra functionality that is available to C++ programmers who define D3D_OVERLOADS.
_D3DVECTOR CrossProduct (const _D3DVECTOR& v1, const _D3DVECTOR& v2);
This function is defined as follows:
inline _D3DVECTOR
CrossProduct (const _D3DVECTOR& v1, const _D3DVECTOR& v2)
{
_D3DVECTOR result;
result[0] = v1[1] * v2[2] - v1[2] * v2[1];
result[1] = v1[2] * v2[0] - v1[0] * v2[2];
result[2] = v1[0] * v2[1] - v1[1] * v2[0];
return result;
}