Skip to main content

Sample

Trait Sample 

Source
pub trait Sample: Copy + Default {
    // Required methods
    fn integrate(
        &mut self,
        velocity: &mut Self,
        target: Self,
        stiffness: f32,
        damping: f32,
        h: f32,
    );
    fn settled(self, target: Self, velocity: Self, rest: Rest) -> bool;
    fn lerp(self, to: Self, t: f32) -> Self;
}

Required Methods§

Source

fn integrate( &mut self, velocity: &mut Self, target: Self, stiffness: f32, damping: f32, h: f32, )

Source

fn settled(self, target: Self, velocity: Self, rest: Rest) -> bool

Source

fn lerp(self, to: Self, t: 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 integrate( &mut self, velocity: &mut Self, target: Self, stiffness: f32, damping: f32, h: f32, )

Source§

fn settled(self, target: Self, velocity: Self, rest: Rest) -> bool

Source§

fn lerp(self, to: Self, t: f32) -> Self

Source§

impl Sample for [f32; 3]

Source§

fn integrate( &mut self, velocity: &mut Self, target: Self, stiffness: f32, damping: f32, h: f32, )

Source§

fn settled(self, target: Self, velocity: Self, rest: Rest) -> bool

Source§

fn lerp(self, to: Self, t: f32) -> Self

Implementors§