pub trait InterpolatedPropertyValue:
    PartialEq
    + Default
    + 'static {
    // Required method
    fn interpolate(&self, target_value: &Self, t: f32) -> Self;
}
Expand description

InterpolatedPropertyValue is a trait used to enable properties to be used with animations that interpolate values. The basic requirement is the ability to apply a progress that’s typically between 0 and 1 to a range.

Required Methods§

source

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

Returns the interpolated value between self and target_value according to the progress parameter t that’s usually between 0 and 1. With certain animation easing curves it may over- or undershoot though.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl InterpolatedPropertyValue for f32

source§

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

source§

impl InterpolatedPropertyValue for i32

source§

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

source§

impl InterpolatedPropertyValue for i64

source§

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

source§

impl InterpolatedPropertyValue for u8

source§

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

Implementors§