idsp

Trait 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

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.

Implementors§