diff --git a/Source/Filters/biquad.cpp b/Source/Filters/biquad.cpp index 41960c4..eafaf05 100644 --- a/Source/Filters/biquad.cpp +++ b/Source/Filters/biquad.cpp @@ -9,7 +9,8 @@ void Biquad::Reset() float con = cutoff_ * two_pi_d_sr_; float alpha = 1.0f - 2.0f * res_ * cosf(con) * cosf(con) + res_ * res_ * cosf(2.f * con); - float beta = res_ * res_ * sinf(2.f * con) - 2.f * res_ * cosf(con) * sinf(con); + float beta + = res_ * res_ * sinf(2.f * con) - 2.f * res_ * cosf(con) * sinf(con); float gamma = 1.f + cosf(con); float m1 = alpha * gamma + beta * sinf(con); float m2 = alpha * gamma - beta * sinf(con); diff --git a/Source/Filters/moogladder.cpp b/Source/Filters/moogladder.cpp index fc768d2..ec984bd 100644 --- a/Source/Filters/moogladder.cpp +++ b/Source/Filters/moogladder.cpp @@ -10,17 +10,14 @@ float MoogLadder::my_tanh(float x) { sign = -1; x = -x; - return x * sign; } - else if(x >= 4.0f) + if(x >= 4.0) { return sign; } - else if(x < 0.5f) - { + if(x < 0.5) return x * sign; - } - return sign * tanhf(x); + return sign * tanh(x); } void MoogLadder::Init(float sample_rate)