diff options
author | Chris Robinson <[email protected]> | 2020-04-02 01:52:07 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2020-04-02 01:52:07 -0700 |
commit | 57109902cd702880537eb507601c44aaf9210cfd (patch) | |
tree | f2aa1bcb99e58d0919c9bb77a407fa91fcd4de00 /common/bsinc_tables.cpp | |
parent | 8853519d896f11b678873f0afacac16b3cdebc27 (diff) |
Avoid std::abs in a constexpr function
Diffstat (limited to 'common/bsinc_tables.cpp')
-rw-r--r-- | common/bsinc_tables.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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<std::is_floating_point<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<double>::Pi()*x) / (al::MathDefs<double>::Pi()*x); } |