diff --git a/dsp/src/accu.rs b/dsp/src/accu.rs index 99369b2..954c35f 100644 --- a/dsp/src/accu.rs +++ b/dsp/src/accu.rs @@ -12,7 +12,6 @@ impl Accu { impl Iterator for Accu { type Item = i32; - #[inline] fn next(&mut self) -> Option { let s = self.state; self.state = self.state.wrapping_add(self.step); diff --git a/dsp/src/complex.rs b/dsp/src/complex.rs index 9829312..256cde2 100644 --- a/dsp/src/complex.rs +++ b/dsp/src/complex.rs @@ -14,7 +14,6 @@ impl Complex { /// Complex::::from_angle(1 << 30); // pi/2 /// Complex::::from_angle(-1 << 30); // -pi/2 /// ``` - #[inline(always)] pub fn from_angle(angle: i32) -> Self { let (c, s) = cossin(angle); Self(c, s) diff --git a/dsp/src/lib.rs b/dsp/src/lib.rs index 74ebdbb..f42e7c7 100644 --- a/dsp/src/lib.rs +++ b/dsp/src/lib.rs @@ -3,38 +3,6 @@ use core::ops::{Add, Mul, Neg}; -/// Bit shift, round up half. -/// -/// # Arguments -/// -/// `x` - Value to shift and round. -/// `shift` - Number of bits to right shift `x`. -/// -/// # Returns -/// -/// Shifted and rounded value. -#[inline(always)] -pub fn shift_round(x: i32, shift: usize) -> i32 { - (x + (1 << (shift - 1))) >> shift -} - -/// Integer division, round up half. -/// -/// # Arguments -/// -/// `dividend` - Value to divide. -/// `divisor` - Value that divides the -/// dividend. `dividend`+`divisor`-1 must be inside [i64::MIN, -/// i64::MAX]. -/// -/// # Returns -/// -/// Divided and rounded value. -#[inline(always)] -pub fn divide_round(dividend: i64, divisor: i64) -> i64 { - (dividend + (divisor - 1)) / divisor -} - fn abs(x: T) -> T where T: PartialOrd + Default + Neg,