Trait rubato::Sample

source ·
pub trait Sample
where Self: Copy + CoerceFrom<usize> + CoerceFrom<f64> + CoerceFrom<f32> + FftNum + Mul + Div + Add + Sub + MulAssign + RemAssign + DivAssign + SubAssign + AddAssign + AvxSample + SseSample + NeonSample + Send,
{ const PI: Self; // Required methods fn sin(self) -> Self; fn cos(self) -> Self; // Provided method fn coerce<T>(value: T) -> Self where Self: CoerceFrom<T> { ... } }
Expand description

The trait governing a single sample.

There are two types which implements this trait so far:

Required Associated Constants§

source

const PI: Self

Required Methods§

source

fn sin(self) -> Self

Calculate the sine of self.

source

fn cos(self) -> Self

Calculate the cosine of self.

Provided Methods§

source

fn coerce<T>(value: T) -> Self
where Self: CoerceFrom<T>,

Coerce value into the current type.

Coercions are governed through the private CoerceFrom trait.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Sample for f32

source§

const PI: Self = 3.14159274f32

source§

fn sin(self) -> Self

source§

fn cos(self) -> Self

source§

impl Sample for f64

source§

const PI: Self = 3.1415926535897931f64

source§

fn sin(self) -> Self

source§

fn cos(self) -> Self

Implementors§