Interpolatable

Trait Interpolatable 

Source
pub trait Interpolatable {
    // Required method
    fn lerp(&self, target: &Self, t: f64) -> Self;
}
Expand description

A trait for interpolating to values

It uses the reference of two values and produce an owned interpolated value.

Required Methods§

Source

fn lerp(&self, target: &Self, t: f64) -> Self

Lerping between 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 Interpolatable for f32

Source§

fn lerp(&self, target: &f32, t: f64) -> f32

Source§

impl Interpolatable for f64

Source§

fn lerp(&self, target: &f64, t: f64) -> f64

Source§

impl Interpolatable for usize

Source§

fn lerp(&self, target: &usize, t: f64) -> usize

Source§

impl Interpolatable for Sphere

Source§

fn lerp(&self, target: &Sphere, t: f64) -> Sphere

Source§

impl Interpolatable for MeshItem

Source§

fn lerp(&self, target: &MeshItem, t: f64) -> MeshItem

Source§

impl Interpolatable for Surface

Source§

fn lerp(&self, target: &Surface, t: f64) -> Surface

Source§

impl Interpolatable for Arc

Source§

fn lerp(&self, other: &Arc, t: f64) -> Arc

Source§

impl Interpolatable for ArcBetweenPoints

Source§

impl Interpolatable for Circle

Source§

fn lerp(&self, other: &Circle, t: f64) -> Circle

Source§

impl Interpolatable for Ellipse

Source§

fn lerp(&self, other: &Ellipse, t: f64) -> Ellipse

Source§

impl Interpolatable for EllipticArc

Source§

fn lerp(&self, other: &EllipticArc, t: f64) -> EllipticArc

Source§

impl Interpolatable for Line

Source§

fn lerp(&self, other: &Line, t: f64) -> Line

Source§

impl Interpolatable for Parallelogram

Source§

fn lerp(&self, other: &Parallelogram, t: f64) -> Parallelogram

Source§

impl Interpolatable for Polygon

Source§

fn lerp(&self, other: &Polygon, t: f64) -> Polygon

Source§

impl Interpolatable for Rectangle

Source§

fn lerp(&self, other: &Rectangle, t: f64) -> Rectangle

Source§

impl Interpolatable for RegularPolygon

Source§

fn lerp(&self, other: &RegularPolygon, t: f64) -> RegularPolygon

Source§

impl Interpolatable for Square

Source§

fn lerp(&self, other: &Square, t: f64) -> Square

Source§

impl Interpolatable for VItem

Source§

fn lerp(&self, other: &VItem, t: f64) -> VItem

Source§

impl Interpolatable for TypstText

Source§

fn lerp(&self, target: &TypstText, t: f64) -> TypstText

Source§

impl Interpolatable for Mat4

Source§

fn lerp(&self, other: &Mat4, t: f64) -> Mat4

Source§

impl Interpolatable for Vec3

Source§

fn lerp(&self, target: &Vec3, t: f64) -> Vec3

Source§

impl Interpolatable for DMat4

Source§

fn lerp(&self, target: &DMat4, t: f64) -> DMat4

Source§

impl Interpolatable for DQuat

Source§

fn lerp(&self, target: &DQuat, t: f64) -> DQuat

Source§

impl Interpolatable for DVec2

Source§

fn lerp(&self, target: &DVec2, t: f64) -> DVec2

Source§

impl Interpolatable for DVec3

Source§

fn lerp(&self, target: &DVec3, t: f64) -> DVec3

Source§

impl<T0> Interpolatable for (T0,)
where T0: Interpolatable,

Source§

fn lerp(&self, target: &(T0,), t: f64) -> (T0,)

Source§

impl<T0, T1> Interpolatable for (T0, T1)

Source§

fn lerp(&self, target: &(T0, T1), t: f64) -> (T0, T1)

Source§

impl<T0, T1, T2> Interpolatable for (T0, T1, T2)

Source§

fn lerp(&self, target: &(T0, T1, T2), t: f64) -> (T0, T1, T2)

Source§

impl<T0, T1, T2, T3> Interpolatable for (T0, T1, T2, T3)

Source§

impl<T0, T1, T2, T3, T4> Interpolatable for (T0, T1, T2, T3, T4)

Source§

impl<T0, T1, T2, T3, T4, T5> Interpolatable for (T0, T1, T2, T3, T4, T5)

Source§

impl<T0, T1, T2, T3, T4, T5, T6> Interpolatable for (T0, T1, T2, T3, T4, T5, T6)

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7> Interpolatable for (T0, T1, T2, T3, T4, T5, T6, T7)

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8> Interpolatable for (T0, T1, T2, T3, T4, T5, T6, T7, T8)

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> Interpolatable for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> Interpolatable for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)

Source§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> Interpolatable for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)

Source§

impl<T> Interpolatable for Vec<T>
where T: Interpolatable,

Source§

fn lerp(&self, target: &Vec<T>, t: f64) -> Vec<T>

Source§

impl<T, const N: usize> Interpolatable for [T; N]
where T: Interpolatable,

Source§

fn lerp(&self, target: &[T; N], t: f64) -> [T; N]

Implementors§