[CodeFactor] Apply fixes to commit 9697fac

This commit is contained in:
codefactor-io
2026-03-14 05:03:08 +00:00
parent 9697facfb4
commit e35ff7fa3f
164 changed files with 458 additions and 530 deletions
+2 -3
View File
@@ -159,7 +159,7 @@ public sealed class Bpf : AbstractBase
// Highpass Filter Step
// hp = hp_c1 * (val - 2*src1 + src2) + hp_c2 * hp1 + hp_c3 * hp2
double term1 = _hpC1 * (val - 2.0 * _state.Src1 + _state.Src2);
double term1 = _hpC1 * (val - (2.0 * _state.Src1) + _state.Src2);
double hp = Math.FusedMultiplyAdd(_hpC2, _state.Hp1, Math.FusedMultiplyAdd(_hpC3, _state.Hp2, term1));
// Lowpass Filter Step (Bandpass output)
@@ -187,7 +187,6 @@ public sealed class Bpf : AbstractBase
return indicator.Update(source);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void Batch(ReadOnlySpan<double> source, Span<double> output, int lowerPeriod, int upperPeriod)
{
@@ -240,7 +239,7 @@ public sealed class Bpf : AbstractBase
}
// Highpass
double term1 = hpC1 * (val - 2.0 * src1 + src2);
double term1 = hpC1 * (val - (2.0 * src1) + src2);
double hp = Math.FusedMultiplyAdd(hpC2, hp1, Math.FusedMultiplyAdd(hpC3, hp2, term1));
// Lowpass