Boost LA

magnitude2

#include <boost/la/vector_magnitude2.hpp>

namespace
boost
    {
    namespace
    la
        {
        //Only enabled if:
        //  is_vector<A>::value
        template <class A>
        typename vector_traits<A>::scalar_type
        magnitude2( A const & a );
        }
    }

Returns:

The squared magnitude of the vector a.

Required access:

a:ir.