Fixed order of FIR coefficients

This commit is contained in:
Sebastian 2023-09-08 13:43:12 +02:00
parent abde00418b
commit 9372fc9831
1 changed files with 1 additions and 1 deletions

View File

@ -22,7 +22,7 @@ impl<const LEN: usize> FirFilter<LEN> {
let mut result = Complex::<f32>::new(0.0, 0.0);
for i in 0..LEN {
result += self.state[(self.pos + i) % LEN] * self.coeffs[i];
result += self.state[(self.pos + i) % LEN] * self.coeffs[self.coeffs.len() - 1 - i];
}
result