Skip to content

Commit

Permalink
rm shift
Browse files Browse the repository at this point in the history
  • Loading branch information
jordens committed Jan 12, 2024
1 parent 118d555 commit d2bd6be
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/num.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ use num_traits::{AsPrimitive, Float, Num};

/// Helper trait unifying fixed point and floating point coefficients/samples
pub trait FilterNum: 'static + Copy + Num + AsPrimitive<Self::ACCU> {
/// Scale
const SHIFT: u32;
/// Multiplicative identity
const ONE: Self;
/// Negative multiplicative identity, equal to `-Self::ONE`.
Expand Down Expand Up @@ -40,7 +38,6 @@ pub trait FilterNum: 'static + Copy + Num + AsPrimitive<Self::ACCU> {
macro_rules! impl_float {
($T:ty) => {
impl FilterNum for $T {
const SHIFT: u32 = 0;
const ONE: Self = 1.0;
const NEG_ONE: Self = -1.0;
const ZERO: Self = 0.0;
Expand Down Expand Up @@ -82,7 +79,6 @@ impl_float!(f64);
macro_rules! impl_int {
($T:ty, $U:ty, $A:ty, $Q:literal) => {
impl FilterNum for $T {
const SHIFT: u32 = $Q;
const ONE: Self = 1 << $Q;
const NEG_ONE: Self = -1 << $Q;
const ZERO: Self = 0;
Expand Down

0 comments on commit d2bd6be

Please sign in to comment.