Trait kira::tween::Tweenable

source ·
pub trait Tweenable: Copy {
    // Required method
    fn lerp(a: Self, b: Self, amount: f64) -> Self;
}
Expand description

A trait for types that can be used with a Tweener.

Required Methods§

source

fn lerp(a: Self, b: Self, amount: f64) -> Self

Returns an linearly interpolated value between a and b.

An amount of 0.0 should yield a, an amount of 1.0 should yield b, and an amount of 0.5 should yield a value halfway between a and b.

Implementations on Foreign Types§

source§

impl Tweenable for f64

source§

fn lerp(a: Self, b: Self, amount: f64) -> Self

Implementors§