From 57109902cd702880537eb507601c44aaf9210cfd Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 2 Apr 2020 01:52:07 -0700 Subject: [PATCH] Avoid std::abs in a constexpr function --- common/bsinc_tables.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/bsinc_tables.cpp b/common/bsinc_tables.cpp index 99033a0b..46919682 100644 --- a/common/bsinc_tables.cpp +++ b/common/bsinc_tables.cpp @@ -85,7 +85,7 @@ constexpr std::enable_if_t::value,T> sin(T x) */ constexpr double Sinc(const double x) { - if(std::abs(x) < 1e-15) + if(!(x > 1e-15 || x < -1e-15)) return 1.0; return sin(al::MathDefs::Pi()*x) / (al::MathDefs::Pi()*x); }