mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-11-27 06:30:28 +08:00
bug #298 - let normalize() return a reference to *this
This commit is contained in:
parent
40287d2fd9
commit
842881cfb1
@ -159,9 +159,10 @@ MatrixBase<Derived>::normalized() const
|
||||
* \sa norm(), normalized()
|
||||
*/
|
||||
template<typename Derived>
|
||||
inline void MatrixBase<Derived>::normalize()
|
||||
inline Derived& MatrixBase<Derived>::normalize()
|
||||
{
|
||||
*this /= norm();
|
||||
return derived();
|
||||
}
|
||||
|
||||
//---------- implementation of other norms ----------
|
||||
|
@ -218,7 +218,7 @@ template<typename Derived> class MatrixBase
|
||||
RealScalar blueNorm() const;
|
||||
RealScalar hypotNorm() const;
|
||||
const PlainObject normalized() const;
|
||||
void normalize();
|
||||
Derived& normalize();
|
||||
|
||||
const AdjointReturnType adjoint() const;
|
||||
void adjointInPlace();
|
||||
|
Loading…
Reference in New Issue
Block a user