mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Much more convenient, less over-engineered NumTraits. Done during this KDE-Edu weekend.
This commit is contained in:
@@ -56,12 +56,12 @@ bool MatrixBase<Scalar, Derived>::isMuchSmallerThan(
|
||||
{
|
||||
if(IsVector)
|
||||
{
|
||||
return(norm2() <= NumTraits<Scalar>::abs2(other) * prec * prec);
|
||||
return(norm2() <= abs2(other) * prec * prec);
|
||||
}
|
||||
else
|
||||
{
|
||||
for(int i = 0; i < cols(); i++)
|
||||
if(col(i).norm2() > NumTraits<Scalar>::abs2(other) * prec * prec)
|
||||
if(col(i).norm2() > abs2(other) * prec * prec)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user