diff --git a/matrix/Vector.hpp b/matrix/Vector.hpp index 3d19e1dac0..fc937c2a42 100644 --- a/matrix/Vector.hpp +++ b/matrix/Vector.hpp @@ -71,6 +71,11 @@ public: return Type(sqrt(a.dot(a))); } + Type norm_squared() const { + const Vector &a(*this); + return Type(a.dot(a)); + } + inline Type length() const { return norm(); }