pub struct Decay<T>where
T: Float,{
pub from_value: T,
pub to_value: T,
pub time_constant: f32,
}Expand description
Decay curve that starts at a given value and decelerates to a given target value.
Fields§
§from_value: TStart value of the animation.
to_value: TTarget value of the animation.
time_constant: f32Adjusting the time constant will change the duration of the deceleration, thereby affecting its feel.
Implementations§
Trait Implementations§
Source§impl<T> Curve for Decay<T>where
T: Float,
impl<T> Curve for Decay<T>where
T: Float,
Source§fn approximate(&self, time: f32) -> Approximation<T>
fn approximate(&self, time: f32) -> Approximation<T>
This should return a single approximation for the given time.
impl<T> Copy for Decay<T>
Auto Trait Implementations§
impl<T> Freeze for Decay<T>where
T: Freeze,
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§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more