The latter are provided for the efficient manipulation of vectors or points in 2D or 3D space, and make heavy use of inlining for frequently-used operations. Any pointer to a generic matrix or vector will become invalid as soon as it is resized. The following binary operators are defined for all vector and matrix classes, as long as both operands are of the same type.
Matrix multiplication is defined as usual, and matrix division is undefined.
For both matrices and vectors, multiplication and division by a scalar is also allowed. Matrices can be multiplied either on the left or the right by a vector. The following is a list of the various vector functions, together with a short description of what they return. The following functions can be used with matrices. Inverse of m, if it exists.