[][src]Struct yoyo_physics::decay::Decay

pub struct Decay<T> where
    T: Float
{ pub from_value: T, pub to_value: T, pub time_constant: f32, }

Decay curve that starts at a given value and decelerates to a given target value.

Fields

from_value: T

Start value of the animation.

to_value: T

Target value of the animation.

time_constant: f32

Adjusting the time constant will change the duration of the deceleration, thereby affecting its feel.

Implementations

impl<T> Decay<T> where
    T: Float
[src]

pub fn ideal_target(from_value: T, power: T, velocity: T) -> T[src]

Computes the ideal target of the decay.

Trait Implementations

impl<T: Clone> Clone for Decay<T> where
    T: Float
[src]

impl<T: Copy> Copy for Decay<T> where
    T: Float
[src]

impl<T> Curve for Decay<T> where
    T: Float
[src]

type Value = T

This is the type that this curve operates on.

type Velocity = T

This is the type of velocity that this curve works with.

impl<T: Debug> Debug for Decay<T> where
    T: Float
[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for Decay<T> where
    T: RefUnwindSafe

impl<T> Send for Decay<T> where
    T: Send

impl<T> Sync for Decay<T> where
    T: Sync

impl<T> Unpin for Decay<T> where
    T: Unpin

impl<T> UnwindSafe for Decay<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.