Prototypes | Header File(s) | |
template <class T> | ||
T |
dot( const RWMathVec<T>& x, const RWMathVec<T>& y) |
<rw/math/mathvec.h> |
Returns the vector dot product z of two vectors, x and y. The two vectors must have the same number of elements or an exception with value MATH_VNMATCH occurs.
For example, if x = [ 0, 1, 2] and y = [ 1, 3, 2], then z = 0 + 3 + 4 = 7. For vectors of type complex, see also function conjDot().