pub struct Inertia { /* private fields */ }Implementations§
Source§impl Inertia
impl Inertia
pub fn new( value: f32, velocity: f32, config: InertiaConfig, ) -> Result<Self, PhysicsError>
pub fn value(&self) -> f32
pub fn velocity(&self) -> f32
pub const fn state(&self) -> InertiaState
pub fn is_active(&self) -> bool
pub fn advance(&mut self, elapsed: Duration) -> bool
pub fn launch(&mut self, value: f32, velocity: f32)
Trait Implementations§
impl Copy for Inertia
impl StructuralPartialEq for Inertia
Auto Trait Implementations§
impl Freeze for Inertia
impl RefUnwindSafe for Inertia
impl Send for Inertia
impl Sync for Inertia
impl Unpin for Inertia
impl UnsafeUnpin for Inertia
impl UnwindSafe for Inertia
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