Interpolatable

Trait Interpolatable 

Source
pub trait Interpolatable: DataPoint {
    // Required method
    fn interpolate(&self, other: &Self, t: f32) -> Self;
}
Expand description

Trait for interpolating between data points (used in animations)

Required Methods§

Source

fn interpolate(&self, other: &Self, t: f32) -> Self

Interpolate between this point and another point

§Arguments
  • other - The target point to interpolate towards
  • t - Interpolation factor (0.0 = self, 1.0 = other)

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.

Implementors§

Source§

impl Interpolatable for TimestampedPoint

Available on crate feature animations only.