Type Alias culsynth::FrequencyFxP

source ·
pub type FrequencyFxP = U14F18;
Expand description

A unsigned 32 bit fixed point number representing a frequency in Hz. This uses 14 integral bits and 18 fractional bits

Aliased Type§

struct FrequencyFxP { /* private fields */ }

Trait Implementations§

source§

impl DspType<i16> for FrequencyFxP

source§

const PI: Self = FrequencyFxP::PI

A constant representing the value PI (3.14159…)
source§

const TAU: Self = FrequencyFxP::TAU

A constant representing the value 2*[PI]
source§

fn zero() -> Self

Returns zero
source§

fn one() -> Self

Returns one
source§

fn dsp_saturating_add(self, rhs: Self) -> Self

This function will perform a saturating addition for fixed-point types, and a normal addition for floating-point types Read more
source§

fn multiply(self, rhs: Self) -> Self

Multiply this type with itself. This trait does not provide any specified behavior for fixed-point overflow.
source§

fn divide_by_two(self) -> Self

Divide a value by two
source§

fn scale(self, rhs: ScalarFxP) -> Self

Multiply this type by a Scalar. This will never overflow (by definition, the result will always be smaller)