diff options
author | Gael Guennebaud <g.gael@free.fr> | 2011-05-25 08:41:45 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2011-05-25 08:41:45 +0200 |
commit | 87ac09daa88c1df338701f2d2b30b09e812cf757 (patch) | |
tree | fbd79b37052ff08feee169776761b3058057481d /Eigen/src/Core/Fuzzy.h | |
parent | 5541bcb7692088ecc671a9e0ebf8af96eaec208e (diff) |
Simplify the use of custom scalar types, the rule is to never directly call a standard math function using std:: but rather put a using std::foo before and simply call foo:
using std::max;
max(a,b);
Diffstat (limited to 'Eigen/src/Core/Fuzzy.h')
-rw-r--r-- | Eigen/src/Core/Fuzzy.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Eigen/src/Core/Fuzzy.h b/Eigen/src/Core/Fuzzy.h index 3cd82d802..6eaa26be8 100644 --- a/Eigen/src/Core/Fuzzy.h +++ b/Eigen/src/Core/Fuzzy.h @@ -34,9 +34,10 @@ struct isApprox_selector { static bool run(const Derived& x, const OtherDerived& y, typename Derived::RealScalar prec) { + using std::min; const typename internal::nested<Derived,2>::type nested(x); const typename internal::nested<OtherDerived,2>::type otherNested(y); - return (nested - otherNested).cwiseAbs2().sum() <= prec * prec * std::min(nested.cwiseAbs2().sum(), otherNested.cwiseAbs2().sum()); + return (nested - otherNested).cwiseAbs2().sum() <= prec * prec * min(nested.cwiseAbs2().sum(), otherNested.cwiseAbs2().sum()); } }; |