1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Core: Use Math namespace for constants

This commit is contained in:
Thaddeus Crews
2025-04-10 11:21:05 -05:00
parent 06c71fbf40
commit 94282d88f9
181 changed files with 812 additions and 818 deletions

View File

@@ -37,13 +37,13 @@ void AudioEffectPhaserInstance::process(const AudioFrame *p_src_frames, AudioFra
float dmin = base->range_min / (sampling_rate / 2.0);
float dmax = base->range_max / (sampling_rate / 2.0);
float increment = Math_TAU * (base->rate / sampling_rate);
float increment = Math::TAU * (base->rate / sampling_rate);
for (int i = 0; i < p_frame_count; i++) {
phase += increment;
while (phase >= Math_TAU) {
phase -= Math_TAU;
while (phase >= Math::TAU) {
phase -= Math::TAU;
}
float d = dmin + (dmax - dmin) * ((sin(phase) + 1.f) / 2.f);