Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
magnetophon committed Dec 8, 2024
1 parent 7d40ef2 commit ca779d3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,7 @@ impl Plugin for Del2 {
}
}

#[allow(clippy::float_cmp)]
fn process(
&mut self,
buffer: &mut Buffer,
Expand Down
2 changes: 1 addition & 1 deletion src/svf_simper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ impl SVFSimper {
pub fn new(cutoff: f32, resonance: f32, sample_rate: f32) -> Self {
let g = (consts::PI * (cutoff / sample_rate)).tan();
// let k = 2f32 - (1.9f32 * resonance.min(1f32).max(0f32));
let k = 2.0f32.mul_add(-resonance.min(1f32).max(0f32), 2f32);
let k = 2.0f32.mul_add(-resonance.clamp(0.0, 1.0), 2f32);

let a1 = 1.0 / g.mul_add(g + k, 1.0);
let a2 = g * a1;
Expand Down

0 comments on commit ca779d3

Please sign in to comment.