lockin: wrapping_neg

This commit is contained in:
Robert Jördens 2021-01-19 11:30:12 +01:00
parent 720b143132
commit 778f4ac4d5
2 changed files with 2 additions and 2 deletions

View File

@ -60,7 +60,7 @@ impl Lockin {
let mut last = Complex::default();
for s in input.iter() {
let m = cossin(-(phase as i32));
let m = cossin((phase as i32).wrapping_neg());
phase = phase.wrapping_add(frequency);
last = Complex(

View File

@ -1026,7 +1026,7 @@ const APP: () = {
dac0.iter_mut().zip(dac1.iter_mut()).enumerate().for_each(
|(i, (d0, d1))| {
let m = cossin(-(phase as i32));
let m = cossin((phase as i32).wrapping_neg());
phase = phase.wrapping_add(frequency);
let signal = Complex(