diff options
-rw-r--r-- | core/bsinc_tables.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/bsinc_tables.cpp b/core/bsinc_tables.cpp index 919bc60b..cfd9a046 100644 --- a/core/bsinc_tables.cpp +++ b/core/bsinc_tables.cpp @@ -24,7 +24,8 @@ using uint = unsigned int; */ constexpr double Sinc(const double x) { - if(!(x > 1e-15 || x < -1e-15)) + constexpr double epsilon{std::numeric_limits<double>::epsilon()}; + if(!(x > epsilon || x < -epsilon)) return 1.0; return std::sin(al::MathDefs<double>::Pi()*x) / (al::MathDefs<double>::Pi()*x); } |