# QVM: Quaternions, Vectors, Matrices

### Scalar Requirements

A valid scalar type S must have accessible destructor, default constructor, copy constructor and assignment operator, and must support the following operations:

    S operator*( S, S );
    S operator/( S, S );
    S operator+( S, S );
    S operator-( S, S );

    S & operator*=( S &, S );
    S & operator/=( S &, S );
    S & operator+=( S &, S );
    S & operator-=( S &, S );

    bool operator==( S, S );
    bool operator!=( S, S );

In addition, the expression S(0) should construct a scalar of value zero, and S(1) should construct a scalar of value one -or- the scalar_traits template must be specialized appropriately.

See also: deduce_scalar | is_scalar | mat_traits | mat_traits<M>::scalar_type | quat_traits | quat_traits<Q>::scalar_type | vec_traits | vec_traits<V>::scalar_type