diff --git a/Eigen/src/Core/Dot.h b/Eigen/src/Core/Dot.h index 6e83191c5..f4aa76690 100644 --- a/Eigen/src/Core/Dot.h +++ b/Eigen/src/Core/Dot.h @@ -159,9 +159,10 @@ MatrixBase::normalized() const * \sa norm(), normalized() */ template -inline void MatrixBase::normalize() +inline Derived& MatrixBase::normalize() { *this /= norm(); + return derived(); } //---------- implementation of other norms ---------- diff --git a/Eigen/src/Core/MatrixBase.h b/Eigen/src/Core/MatrixBase.h index e2d34d257..b75231057 100644 --- a/Eigen/src/Core/MatrixBase.h +++ b/Eigen/src/Core/MatrixBase.h @@ -218,7 +218,7 @@ template class MatrixBase RealScalar blueNorm() const; RealScalar hypotNorm() const; const PlainObject normalized() const; - void normalize(); + Derived& normalize(); const AdjointReturnType adjoint() const; void adjointInPlace();