lowpass: clippy
This commit is contained in:
parent
30c2c2aac2
commit
13b47556fd
@ -12,7 +12,7 @@ impl Lockin {
|
||||
pub fn new(k: u8) -> Self {
|
||||
let lp = Lowpass::default();
|
||||
Self {
|
||||
state: [lp.clone(), lp.clone()],
|
||||
state: [lp.clone(), lp],
|
||||
k,
|
||||
}
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ impl<N: ArrayLength<i32>> Lowpass<N> {
|
||||
let mut x1 = self.xy[0];
|
||||
self.xy[0] = x;
|
||||
for y1 in self.xy[1..].iter_mut() {
|
||||
x0 = *y1 + (((x0 >> 1) + (x1 >> 1) - *y1 + (1 << k - 1)) >> k);
|
||||
x0 = *y1 + (((x0 >> 1) + (x1 >> 1) - *y1 + (1 << (k - 1))) >> k);
|
||||
x1 = *y1;
|
||||
*y1 = x0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user