Next: , Previous: , Up: TinyVector   [Contents][Index]


7.6 Global functions

dot(TinyVector, TinyVector);
dot(vector-expr, TinyVector);
dot(TinyVector, vector-expr);
dot(vector-expr, vector-expr);

These functions calculate a dot product between TinyVectors (or vector expressions). The result is a scalar; the type of the scalar follows the usual type promotion rules.

product(TinyVector);

Returns the product of all the elements in the vector.

sum(TinyVector);

Returns the sum of the elements in the vector.

TinyVector<T,3> cross(TinyVector<T,3> x, TinyVector<T,3> y);

Returns the cross product of x and y.