Interpolate

Trait Interpolate 

Source
pub trait Interpolate {
    // Required method
    fn interpolate(from: &Self, to: &Self, t: f64) -> Self;
}
Expand description

Trait for types that can be interpolated.

Required Methods§

Source

fn interpolate(from: &Self, to: &Self, t: f64) -> Self

Interpolate between two values.

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

Source§

fn interpolate(from: &f32, to: &f32, t: f64) -> f32

Source§

impl Interpolate for f64

Source§

fn interpolate(from: &f64, to: &f64, t: f64) -> f64

Implementors§