Game Development Reference
In-Depth Information
Triple Scalar Product
This function takes the triple scalar product of the vectors u , v , and w according to the
formula:
s = u • ( v × w )
Here, the result, s , is a scalar. The code is as follows:
inline float TripleScalarProduct(Vector u, Vector v, Vector w)
{
return float( (u.x * (v.y*w.z - v.z*w.y)) +
(u.y * (-v.x*w.z + v.z*w.x)) +
(u.z * (v.x*w.y - v.y*w.x)) );
}
Search Nedrilad ::




Custom Search