diff options
author | kcgen <kcgen@users.noreply.github.com> | 2022-07-05 05:49:16 +0300 |
---|---|---|
committer | kcgen <kcgen@users.noreply.github.com> | 2022-07-05 05:49:16 +0300 |
commit | 2a44a2822bfaae97fbf5ff641a91e57f0139be6a (patch) | |
tree | 2363c8022594f5da8f8e1cf7e38dd60486bf8012 | |
parent | f3cca6a8cded223825518925cbaa84dfe299bec1 (diff) |
Use doubles and PI constant in mverb UpdateCoefficientkc/jnovak/reverb-enum-1
-rw-r--r-- | src/libs/mverb/MVerb.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libs/mverb/MVerb.h b/src/libs/mverb/MVerb.h index 659381205..b2eeaa5a6 100644 --- a/src/libs/mverb/MVerb.h +++ b/src/libs/mverb/MVerb.h @@ -17,6 +17,9 @@ #ifndef EMVERB_H #define EMVERB_H +#define _USE_MATH_DEFINES +#include <cmath> + //forward declaration template<typename T, int maxLength> class Allpass; template<typename T, int maxLength> class StaticAllpassFourTap; @@ -874,7 +877,7 @@ template<typename T, int OverSampleCount> private: void UpdateCoefficient() { - f = static_cast<T>(2. * sinf(3.141592654 * frequency / sampleRate)); + f = static_cast<T>(2.0 * sin(M_PI * frequency / sampleRate)); } }; #endif |