Skip to main content

Interpolate

Trait Interpolate 

Source
pub trait Interpolate: Sized {
    // Required method
    fn interpolate(from: Self, to: Self, phase: f32) -> Self;
}
Expand description

A value that supports linear interpolation and extrapolation.

Required Methods§

Source

fn interpolate(from: Self, to: Self, phase: f32) -> Self

Resolves the value at phase, where 0 is from and 1 is to.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Interpolate for f32

Source§

fn interpolate(from: Self, to: Self, phase: f32) -> Self

Implementors§