Trait idsp::ComplexExt

source ·
pub trait ComplexExt<T, U> {
    // Required methods
    fn from_angle(angle: T) -> Self;
    fn abs_sqr(&self) -> U;
    fn log2(&self) -> T;
    fn arg(&self) -> T;
    fn saturating_add(&self, other: Self) -> Self;
    fn saturating_sub(&self, other: Self) -> Self;
}
Expand description

Complex extension trait offering DSP (fast, good accuracy) functionality.

Required Methods§

source

fn from_angle(angle: T) -> Self

Unit magnitude from angle

source

fn abs_sqr(&self) -> U

Square of magnitude

source

fn log2(&self) -> T

Log2 approximation

source

fn arg(&self) -> T

Angle

source

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

Staturating addition

source

fn saturating_sub(&self, other: Self) -> Self

Saturating subtraction

Object Safety§

This trait is not object safe.

Implementors§