Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dosbox-staging/dosbox-staging.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkcgen <kcgen@users.noreply.github.com>2022-07-05 05:49:16 +0300
committerkcgen <kcgen@users.noreply.github.com>2022-07-05 05:49:16 +0300
commit2a44a2822bfaae97fbf5ff641a91e57f0139be6a (patch)
tree2363c8022594f5da8f8e1cf7e38dd60486bf8012
parentf3cca6a8cded223825518925cbaa84dfe299bec1 (diff)
Use doubles and PI constant in mverb UpdateCoefficientkc/jnovak/reverb-enum-1
-rw-r--r--src/libs/mverb/MVerb.h5
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