Skip to content

Commit

Permalink
Extract CSE
Browse files Browse the repository at this point in the history
  • Loading branch information
DrPeaboss committed Oct 16, 2024
1 parent f0a2615 commit 53a90e4
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/sinc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,10 @@ impl Converter {
left = iter_count - 1;
right = iter_count;
}
let coef = coef + self.half_order;
for _ in 0..iter_count {
let idx1 = left as f64 - self.half_order;
let idx2 = right as f64 - self.half_order;
let pos1 = (coef - idx1).abs() * self.quan;
let pos2 = (coef - idx2).abs() * self.quan;
let pos1 = (coef - left as f64).abs() * self.quan;
let pos2 = (coef - right as f64).abs() * self.quan;
let pos1u = pos1 as usize;
let pos2u = pos2 as usize;
if pos1u < pos_max {
Expand Down

0 comments on commit 53a90e4

Please sign in to comment.