diff options
author | Aaron Franke <arnfranke@yahoo.com> | 2020-04-03 05:50:40 -0400 |
---|---|---|
committer | Aaron Franke <arnfranke@yahoo.com> | 2021-01-09 03:47:14 -0500 |
commit | 1d5042c9e265219dec8da7311879f12ef3ef698b (patch) | |
tree | 9456ab509bbcaf26cad8dca32dbe18a3cca9277d /servers/audio/effects/eq.cpp | |
parent | 98ccaa1bad97bdb83b2afd6a4df6f7a392745592 (diff) | |
download | redot-engine-1d5042c9e265219dec8da7311879f12ef3ef698b.tar.gz |
Use Math_TAU and deg2rad/rad2deg in more places and optimize code
Diffstat (limited to 'servers/audio/effects/eq.cpp')
-rw-r--r-- | servers/audio/effects/eq.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/servers/audio/effects/eq.cpp b/servers/audio/effects/eq.cpp index 2181411b9e..e0c3eb6d3a 100644 --- a/servers/audio/effects/eq.cpp +++ b/servers/audio/effects/eq.cpp @@ -89,8 +89,8 @@ void EQ::recalculate_band_coefficients() { double frq_l = round(frq / pow(2.0, octave_size / 2.0)); double side_gain2 = POW2(Math_SQRT12); - double th = 2.0 * Math_PI * frq / mix_rate; - double th_l = 2.0 * Math_PI * frq_l / mix_rate; + double th = Math_TAU * frq / mix_rate; + double th_l = Math_TAU * frq_l / mix_rate; double c2a = side_gain2 * POW2(cos(th)) - 2.0 * side_gain2 * cos(th_l) * cos(th) + side_gain2 - POW2(sin(th_l)); |