CanTween

Trait CanTween 

Source
pub trait CanTween {
    // Required method
    fn ease(from: Self, to: Self, time: impl Float) -> Self;
}
Expand description

Type that can be used with an easing function

Required Methods§

Source

fn ease(from: Self, to: Self, time: impl Float) -> Self

Returns the interpolated value between from and to at the specified time.

§Note

This function will always create a new value, so calling it on very large structures is not a good idea.

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 CanTween for f32

Source§

fn ease(from: Self, to: Self, time: impl Float) -> Self

Source§

impl CanTween for f64

Source§

fn ease(from: Self, to: Self, time: impl Float) -> Self

Source§

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

Source§

fn ease(from: Self, to: Self, time: impl Float) -> Self

Source§

impl<V: CanTween> CanTween for Point2<V>

Source§

fn ease(from: Self, to: Self, time: impl Float) -> Self

Source§

impl<V: CanTween> CanTween for Point3<V>

Source§

fn ease(from: Self, to: Self, time: impl Float) -> Self

Source§

impl<V: CanTween> CanTween for Vector2<V>

Source§

fn ease(from: Self, to: Self, time: impl Float) -> Self

Source§

impl<V: CanTween> CanTween for Vector3<V>

Source§

fn ease(from: Self, to: Self, time: impl Float) -> Self

Source§

impl<V: CanTween> CanTween for Vector4<V>

Source§

fn ease(from: Self, to: Self, time: impl Float) -> Self

Implementors§