Trait Tween

Source
pub trait Tween {
    // Required method
    fn tween(&mut self, value_1: &Self, value_2: &Self, slider: f32);
}
Expand description

§Tween Trait

Trait for implementing tweening logic for data types.

Required Methods§

Source

fn tween(&mut self, value_1: &Self, value_2: &Self, slider: f32)

§Tween

Function for linear interpolation between 2 values.

  • slide ranges from 0.0 to 1.0

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

Source§

fn tween(&mut self, value_1: &Self, value_2: &Self, slider: f32)

Implementors§