Normalize

This helper function returns the normalized version of the specified vector (that is, a unit-length vector with the same direction as the source). Normalize is part of the suite of extra functionality that is available to C++ programmers who define D3D_OVERLOADS.

_D3DVECTOR Normalize (const _D3DVECTOR& v);
 

This function is defined as follows:

inline _D3DVECTOR
Normalize (const _D3DVECTOR& v)
{
   return v / Magnitude(v);
}