Trait Sample

Source
pub trait Sample: Sample + Copy {
    // Required methods
    fn valid(self) -> bool;
    fn blend(a: Self, b: Self, amount: f32) -> Self;
}

Required Methods§

Source

fn valid(self) -> bool

Source

fn blend(a: Self, b: Self, amount: f32) -> Self

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.

Implementations on Foreign Types§

Source§

impl Sample for f32

Source§

fn valid(self) -> bool

Source§

fn blend(a: f32, b: f32, amount: f32) -> f32

Source§

impl Sample for [f32; 3]

Source§

fn valid(self) -> bool

Source§

fn blend(a: [f32; 3], b: [f32; 3], amount: f32) -> [f32; 3]

Source§

impl Sample for [f32; 4]

Source§

fn valid(self) -> bool

Source§

fn blend(a: [f32; 4], b: [f32; 4], amount: f32) -> [f32; 4]

Implementors§