DirectX SDK

DotProduct

This helper function returns the dot product of the specified vectors. DotProduct is part of the suite of extra functionality that is available to C++ programmers who define D3D_OVERLOADS.

D3DVALUE DotProduct (const _D3DVECTOR& v1, const _D3DVECTOR& v2);

This function is defined as follows:

inline D3DVALUE
DotProduct (const _D3DVECTOR& v1, const _D3DVECTOR& v2)
{
   return v1.x*v2.x + v1.y * v2.y + v1.z*v2.z;
}

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Windows CE: Unsupported.
  Version: Requires DirectX 5.0 or later.
  Header: Declared in d3d.h.

See Also

CrossProduct