pub struct Decay<T> { /* private fields */ }Implementations§
Source§impl<T: MotionValue> Decay<T>
impl<T: MotionValue> Decay<T>
pub fn new( value: T, velocity: T, config: DecayConfig, ) -> Result<Self, PhysicsError>
pub const fn value(&self) -> T
pub const fn velocity(&self) -> T
pub const fn is_active(&self) -> bool
pub fn kick(&mut self, velocity: T)
pub fn advance(&mut self, elapsed: Duration) -> bool
Trait Implementations§
impl<T: Copy> Copy for Decay<T>
impl<T: PartialEq> StructuralPartialEq 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> UnsafeUnpin for Decay<T>where
T: UnsafeUnpin,
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