Boost QVM

mag2(q)

#include <boost/qvm/q.hpp>

namespace boost
{
    namespace qvm
    {
        //Only enabled if: is_q<A>::value
        template <class A>
        typename q_traits<A>::scalar_type
        mag2( A const & a );
    }
}

Returns:

The squared magnitude of the quaternion a.


See also: boost/qvm/q.hpp