Skip to main content

q15

Type Alias q15 

Source
pub type q15 = FixedI16<UInt<UInt<UInt<UInt<UTerm, B1>, B1>, B1>, B1>>;
Expand description

FixedI16 with one integer bit and 15 fractional bits.

Aliased Type§

pub struct q15 { /* private fields */ }

Trait Implementations§

Source§

impl DspSample for q15

Source§

const ZERO: Self = Self::ZERO

Additive identity (0.0).
Source§

const ONE: Self = Self::MAX

Multiplicative identity or normalized unity (1.0).
Source§

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

Saturating addition.
Source§

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

Saturating subtraction.
Source§

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

Saturating multiplication.
Source§

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

Saturating division.
Source§

fn abs_val(self) -> Self

Absolute value.
Source§

fn to_f32(self) -> f32

Convert to floating-point f32.
Source§

fn from_f32(val: f32) -> Self

Convert from floating-point f32.