Multiplication Operator (D3D_OVERLOADS)

This binary operator is an overloaded operator for the D3D_OVERLOADS extensions. Both scalar and vector forms of this operator have been implemented. The multiplication operator is defined as follows:

_D3DVECTOR operator * (const _D3DVECTOR& v, D3DVALUE s);

_D3DVECTOR operator * (D3DVALUE s, const _D3DVECTOR& v);

_D3DVECTOR operator * (const _D3DVECTOR& v1, const _D3DVECTOR& v2);

inline _D3DVECTOR

operator * (const _D3DVECTOR& v1, const _D3DVECTOR& v2)

{

return _D3DVECTOR(v1.x*v2.x, v1.y*v2.y, v1.z*v2.z);

}

inline _D3DVECTOR

operator * (const _D3DVECTOR& v, D3DVALUE s)

{

return _D3DVECTOR(s*v.x, s*v.y, s*v.z);

}

inline _D3DVECTOR

operator * (D3DVALUE s, const _D3DVECTOR& v)

{

return _D3DVECTOR(s*v.x, s*v.y, s*v.z);

}