MulNorm

Trait MulNorm 

Source
pub trait MulNorm {
    // Required methods
    fn saturating_add(self, other: Self) -> Self;
    fn mul_norm(self, other: Self) -> Self;
}
Expand description

This trait is being used for scaling sample amplitudes.

Required Methods§

Source

fn saturating_add(self, other: Self) -> Self

Saturating addition. Computes self + other, saturating at the normalized bounds instead of overflowing.

Float samples operates in range: [-1.0, 1.0], integer: [min, max]

Source

fn mul_norm(self, other: Self) -> Self

Multiplies self with the other in the normalized sample amplitude range.

Float samples operates in range: [-1.0, 1.0], integer: [min, max]

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl MulNorm for f32

Source§

fn saturating_add(self, other: f32) -> f32

Source§

fn mul_norm(self, other: f32) -> f32

Source§

impl MulNorm for i16

Source§

fn saturating_add(self, other: i16) -> i16

Source§

fn mul_norm(self, other: i16) -> i16

Source§

impl MulNorm for i32

Source§

fn saturating_add(self, other: i32) -> i32

Source§

fn mul_norm(self, other: i32) -> i32

Implementors§