# QVM: Quaternions, Vectors, Matrices

### rot_mat

#include <boost/qvm/mat_operations.hpp>

    namespace qvm
    {
        //Only enabled if:
        //  is_vec<A>::value && vec_traits<A>::dim==3
        template <int Dim,class A,class Angle>
        -unspecified-return-type
        rot_mat( A const & axis, Angle angle );
    }

#### Returns:

A matrix of unspecified type, of Dim rows and Dim columns parameter, which performs a rotation around the axis at angle radians.

#### Throws:

In case the axis vector has zero magnitude, throws zero_magnitude_error.

#### Note:

The rot_mat function is not a view proxy; it returns a temp object.

See also: boost/qvm/mat_operations.hpp | Known Quirks and Issues | rotate(mat,vec,scalar) | set_rot(mat,vec,scalar)