mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-12 19:59:05 +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()
|
* \sa norm(), normalized()
|
||||||
*/
|
*/
|
||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
inline void MatrixBase<Derived>::normalize()
|
inline Derived& MatrixBase<Derived>::normalize()
|
||||||
{
|
{
|
||||||
*this /= norm();
|
*this /= norm();
|
||||||
|
return derived();
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------- implementation of other norms ----------
|
//---------- implementation of other norms ----------
|
||||||
|
@ -218,7 +218,7 @@ template<typename Derived> class MatrixBase
|
|||||||
RealScalar blueNorm() const;
|
RealScalar blueNorm() const;
|
||||||
RealScalar hypotNorm() const;
|
RealScalar hypotNorm() const;
|
||||||
const PlainObject normalized() const;
|
const PlainObject normalized() const;
|
||||||
void normalize();
|
Derived& normalize();
|
||||||
|
|
||||||
const AdjointReturnType adjoint() const;
|
const AdjointReturnType adjoint() const;
|
||||||
void adjointInPlace();
|
void adjointInPlace();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user