From 3ba9704745d377a5ae936e8a806a0bdabc4a1594 Mon Sep 17 00:00:00 2001 From: Thomas Fischer <thomas.fischer@ufz.de> Date: Tue, 22 Dec 2020 08:27:14 +0100 Subject: [PATCH] [MaL] std::fabs -> std::abs. --- MathLib/Curve/PiecewiseLinearMonotonicCurve.cpp | 2 +- MathLib/Nonlinear/Root1D.h | 2 +- MathLib/TemplatePoint.h | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/MathLib/Curve/PiecewiseLinearMonotonicCurve.cpp b/MathLib/Curve/PiecewiseLinearMonotonicCurve.cpp index 6ddc1026b29..fdd73775ea0 100644 --- a/MathLib/Curve/PiecewiseLinearMonotonicCurve.cpp +++ b/MathLib/Curve/PiecewiseLinearMonotonicCurve.cpp @@ -34,7 +34,7 @@ bool PiecewiseLinearMonotonicCurve::isStrongMonotonic() const { const double gradient0 = getDerivative(_supp_pnts[0]); - if (std::fabs(gradient0) < std::numeric_limits<double>::min()) + if (std::abs(gradient0) < std::numeric_limits<double>::min()) { return false; } diff --git a/MathLib/Nonlinear/Root1D.h b/MathLib/Nonlinear/Root1D.h index edc37751936..a2e9f8f273b 100644 --- a/MathLib/Nonlinear/Root1D.h +++ b/MathLib/Nonlinear/Root1D.h @@ -112,7 +112,7 @@ public: } //! Returns the size of the current search interval. - double getRange() const { return std::fabs(_a - _b); } + double getRange() const { return std::abs(_a - _b); } private: Function const& _f; diff --git a/MathLib/TemplatePoint.h b/MathLib/TemplatePoint.h index a1831f74869..a106db21677 100644 --- a/MathLib/TemplatePoint.h +++ b/MathLib/TemplatePoint.h @@ -155,8 +155,8 @@ bool lessEq(TemplatePoint<T, DIM> const& a, TemplatePoint<T, DIM> const& b, { auto coordinateIsLargerEps = [&eps](T const u, T const v) -> bool { - return std::fabs(u - v) > eps * std::min(std::fabs(v), std::fabs(u)) && - std::fabs(u - v) > eps; + return std::abs(u - v) > eps * std::min(std::abs(v), std::abs(u)) && + std::abs(u - v) > eps; }; for (std::size_t i = 0; i < DIM; ++i) -- GitLab