Skip to main content

SpringAnim

Trait SpringAnim 

Source
pub trait SpringAnim: Sized + Default {
    type Velocity: Default + Debug;

    // Required method
    fn spring(
        current: &Self,
        target: &Self,
        velocity: &Self::Velocity,
        params: SpringParams,
        delta: f64,
    ) -> (Self, Self::Velocity);
}

Required Associated Types§

Required Methods§

Source

fn spring( current: &Self, target: &Self, velocity: &Self::Velocity, params: SpringParams, delta: f64, ) -> (Self, Self::Velocity)

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 SpringAnim for f32

Source§

type Velocity = f64

Source§

fn spring( current: &f32, target: &f32, velocity: &f64, params: SpringParams, dt: f64, ) -> (f32, f64)

Source§

impl SpringAnim for f64

Source§

type Velocity = f64

Source§

fn spring( current: &f64, target: &f64, velocity: &f64, params: SpringParams, dt: f64, ) -> (f64, f64)

Source§

impl SpringAnim for i8

Source§

type Velocity = f64

Source§

fn spring( current: &i8, target: &i8, velocity: &f64, params: SpringParams, dt: f64, ) -> (i8, f64)

Source§

impl SpringAnim for i16

Source§

type Velocity = f64

Source§

fn spring( current: &i16, target: &i16, velocity: &f64, params: SpringParams, dt: f64, ) -> (i16, f64)

Source§

impl SpringAnim for i32

Source§

type Velocity = f64

Source§

fn spring( current: &i32, target: &i32, velocity: &f64, params: SpringParams, dt: f64, ) -> (i32, f64)

Source§

impl SpringAnim for i64

Source§

type Velocity = f64

Source§

fn spring( current: &i64, target: &i64, velocity: &f64, params: SpringParams, dt: f64, ) -> (i64, f64)

Source§

impl SpringAnim for isize

Source§

type Velocity = f64

Source§

fn spring( current: &isize, target: &isize, velocity: &f64, params: SpringParams, dt: f64, ) -> (isize, f64)

Source§

impl SpringAnim for u8

Source§

type Velocity = f64

Source§

fn spring( current: &u8, target: &u8, velocity: &f64, params: SpringParams, dt: f64, ) -> (u8, f64)

Source§

impl SpringAnim for u16

Source§

type Velocity = f64

Source§

fn spring( current: &u16, target: &u16, velocity: &f64, params: SpringParams, dt: f64, ) -> (u16, f64)

Source§

impl SpringAnim for u32

Source§

type Velocity = f64

Source§

fn spring( current: &u32, target: &u32, velocity: &f64, params: SpringParams, dt: f64, ) -> (u32, f64)

Source§

impl SpringAnim for u64

Source§

type Velocity = f64

Source§

fn spring( current: &u64, target: &u64, velocity: &f64, params: SpringParams, dt: f64, ) -> (u64, f64)

Source§

impl SpringAnim for usize

Source§

type Velocity = f64

Source§

fn spring( current: &usize, target: &usize, velocity: &f64, params: SpringParams, dt: f64, ) -> (usize, f64)

Implementors§