mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Began phasing out double_Pi and float_Pi in favour of MathConstants::pi. Also added MathConstants::twoPi
This commit is contained in:
parent
daab5147c2
commit
d0111a4f96
49 changed files with 307 additions and 292 deletions
|
|
@ -56,25 +56,25 @@ struct FFTUnitTest : public UnitTest
|
|||
}
|
||||
|
||||
static void performReferenceFourier (const Complex<float>* in, Complex<float>* out,
|
||||
size_t n, bool reverve)
|
||||
size_t n, bool reverse)
|
||||
{
|
||||
float base_freq = static_cast<float>(((reverve ? 1.0 : -1.0) * 2.0 * double_Pi)
|
||||
/ static_cast<float> (n));
|
||||
auto base_freq = static_cast<float> (((reverse ? 1.0 : -1.0) * MathConstants<double>::twoPi)
|
||||
/ static_cast<float> (n));
|
||||
|
||||
for (size_t i = 0; i < n; ++i)
|
||||
out[i] = freqConvolution (in, static_cast<float>(i) * base_freq, n);
|
||||
}
|
||||
|
||||
static void performReferenceFourier (const float* in, Complex<float>* out,
|
||||
size_t n, bool reverve)
|
||||
size_t n, bool reverse)
|
||||
{
|
||||
HeapBlock<Complex<float>> buffer (n);
|
||||
|
||||
for (size_t i = 0; i < n; ++i)
|
||||
buffer.getData()[i] = Complex<float> (in[i], 0.0f);
|
||||
|
||||
float base_freq = static_cast<float>(((reverve ? 1.0 : -1.0) * 2.0 * double_Pi)
|
||||
/ static_cast<float> (n));
|
||||
float base_freq = static_cast<float> (((reverse ? 1.0 : -1.0) * MathConstants<double>::twoPi)
|
||||
/ static_cast<float> (n));
|
||||
|
||||
for (size_t i = 0; i < n; ++i)
|
||||
out[i] = freqConvolution (buffer.getData(), static_cast<float>(i) * base_freq, n);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue