lockin: wrapping_neg
This commit is contained in:
parent
720b143132
commit
778f4ac4d5
@ -60,7 +60,7 @@ impl Lockin {
|
|||||||
let mut last = Complex::default();
|
let mut last = Complex::default();
|
||||||
|
|
||||||
for s in input.iter() {
|
for s in input.iter() {
|
||||||
let m = cossin(-(phase as i32));
|
let m = cossin((phase as i32).wrapping_neg());
|
||||||
phase = phase.wrapping_add(frequency);
|
phase = phase.wrapping_add(frequency);
|
||||||
|
|
||||||
last = Complex(
|
last = Complex(
|
||||||
|
@ -1026,7 +1026,7 @@ const APP: () = {
|
|||||||
|
|
||||||
dac0.iter_mut().zip(dac1.iter_mut()).enumerate().for_each(
|
dac0.iter_mut().zip(dac1.iter_mut()).enumerate().for_each(
|
||||||
|(i, (d0, d1))| {
|
|(i, (d0, d1))| {
|
||||||
let m = cossin(-(phase as i32));
|
let m = cossin((phase as i32).wrapping_neg());
|
||||||
phase = phase.wrapping_add(frequency);
|
phase = phase.wrapping_add(frequency);
|
||||||
|
|
||||||
let signal = Complex(
|
let signal = Complex(
|
||||||
|
Loading…
Reference in New Issue
Block a user