diff options
author | Chris Robinson <[email protected]> | 2018-12-22 16:01:14 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-12-22 16:01:14 -0800 |
commit | 334b3a905a1a387d5fb5f74483a7520bb5d5449a (patch) | |
tree | 8f6aa333bb1b4eecbf9bcfe3f3f972c895345480 /Alc/filters | |
parent | d4d98e2fe9820f390515baf581dea7dc9bec1431 (diff) |
Clean up some math stuff
Diffstat (limited to 'Alc/filters')
-rw-r--r-- | Alc/filters/splitter.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Alc/filters/splitter.cpp b/Alc/filters/splitter.cpp index 18518dbb..27ea697a 100644 --- a/Alc/filters/splitter.cpp +++ b/Alc/filters/splitter.cpp @@ -4,6 +4,7 @@ #include "splitter.h" #include <cmath> +#include <limits> #include <algorithm> #include "math_defs.h" @@ -13,7 +14,7 @@ void BandSplitter::init(float f0norm) { float w = f0norm * F_TAU; float cw = std::cos(w); - if(cw > FLT_EPSILON) + if(cw > std::numeric_limits<float>::epsilon()) coeff = (std::sin(w) - 1.0f) / cw; else coeff = cw * -0.5f; @@ -63,7 +64,7 @@ void SplitterAllpass::init(float f0norm) { float w = f0norm * F_TAU; float cw = std::cos(w); - if(cw > FLT_EPSILON) + if(cw > std::numeric_limits<float>::epsilon()) coeff = (std::sin(w) - 1.0f) / cw; else coeff = cw * -0.5f; |