Interpolatable

Trait Interpolatable 

Source
pub trait Interpolatable: Clone {
    // Required method
    fn interpolate(self, other: Self, progress: f32) -> Option<Self>;
}
Expand description

Trait for types that can be interpolated between two values.

Required Methods§

Source

fn interpolate(self, other: Self, progress: f32) -> Option<Self>

Interpolate between two values with the given progress (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 Interpolatable for f32

Source§

fn interpolate(self, other: Self, progress: f32) -> Option<Self>

Source§

impl Interpolatable for i32

Source§

fn interpolate(self, other: Self, progress: f32) -> Option<Self>

Implementors§