Fixed order of FIR coefficients
This commit is contained in:
parent
abde00418b
commit
9372fc9831
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue