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§
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 Interpolatable for ArcBetweenPoints
impl Interpolatable for ArcBetweenPoints
fn lerp(&self, other: &ArcBetweenPoints, t: f64) -> ArcBetweenPoints
Source§impl Interpolatable for EllipticArc
impl Interpolatable for EllipticArc
fn lerp(&self, other: &EllipticArc, t: f64) -> EllipticArc
Source§impl Interpolatable for Parallelogram
impl Interpolatable for Parallelogram
fn lerp(&self, other: &Parallelogram, t: f64) -> Parallelogram
Source§impl Interpolatable for Rectangle
impl Interpolatable for Rectangle
Source§impl Interpolatable for RegularPolygon
impl Interpolatable for RegularPolygon
fn lerp(&self, other: &RegularPolygon, t: f64) -> RegularPolygon
Source§impl Interpolatable for TypstText
impl Interpolatable for TypstText
Source§impl<I, G> Interpolatable for Node<I, G>where
I: Interpolatable,
G: Interpolatable,
impl<I, G> Interpolatable for Node<I, G>where
I: Interpolatable,
G: Interpolatable,
Source§fn lerp(&self, target: &Node<I, G>, t: f64) -> Node<I, G>
fn lerp(&self, target: &Node<I, G>, t: f64) -> Node<I, G>
Structural lerp: nodes interpolate positionally, payloads and node
poses interpolate independently, and ids switch at the mid-point like
other front-loaded fields in ranim. Callers must have aligned
structures first (see Alignable): payload-presence mismatches
panic, and unequal sibling counts follow Vec’s truncating-zip
precedent.