mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-11 23:54:18 +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
|
|
@ -78,7 +78,7 @@ public:
|
|||
channelData[i] = amplitude * std::sin (phase);
|
||||
|
||||
// increment the phase step for the next sample
|
||||
phase = std::fmod (phase + phaseDelta, float_Pi * 2.0f);
|
||||
phase = std::fmod (phase + phaseDelta, MathConstants<float>::twoPi);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -130,7 +130,7 @@ public:
|
|||
frequency = (getHeight() - e.y) * 10.0f;
|
||||
amplitude = jmin (0.9f, 0.2f * e.position.x / getWidth());
|
||||
|
||||
phaseDelta = (float) (2.0 * double_Pi * frequency / sampleRate);
|
||||
phaseDelta = (float) (MathConstants<double>::twoPi * frequency / sampleRate);
|
||||
|
||||
repaint();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue