pub struct Spring {
pub mass: f64,
pub stiffness: f64,
pub damping: f64,
pub velocity: f64,
}Expand description
A mass on a damped spring, released at rest position 0 toward 1.
Fields§
§mass: f64The mass, positive.
stiffness: f64The spring constant, positive.
damping: f64The damping coefficient, positive.
velocity: f64The velocity at the start, in distances to the target per second.
Implementations§
Trait Implementations§
impl Copy for Spring
impl StructuralPartialEq for Spring
Auto Trait Implementations§
impl Forget for Spring
impl Freeze for Spring
impl Move for Spring
impl RefUnwindSafe for Spring
impl Send for Spring
impl Sync for Spring
impl Unpin for Spring
impl UnsafeUnpin for Spring
impl UnwindSafe for Spring
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