pub struct SpringDesc {
pub mass: f64,
pub stiffness: f64,
pub damping_ratio: f64,
}Expand description
Physical parameters of a damped spring (a mass on a spring with a damper).
damping_ratio is the dimensionless ζ: < 1 under-damped (overshoots and
oscillates), == 1 critically damped (fastest non-overshooting settle),
> 1 over-damped (slow, no overshoot). M3’s standard spring presets (which
live in frust-theme, not here) are expressed in these terms.
Fields§
§mass: f64Mass of the moving body (> 0).
stiffness: f64Spring stiffness k (> 0); higher is snappier.
damping_ratio: f64Damping ratio ζ (> 0); see the type docs.
Trait Implementations§
Source§impl Clone for SpringDesc
impl Clone for SpringDesc
impl Copy for SpringDesc
Source§impl Debug for SpringDesc
impl Debug for SpringDesc
Source§impl PartialEq for SpringDesc
impl PartialEq for SpringDesc
impl StructuralPartialEq for SpringDesc
Auto Trait Implementations§
impl Freeze for SpringDesc
impl RefUnwindSafe for SpringDesc
impl Send for SpringDesc
impl Sync for SpringDesc
impl Unpin for SpringDesc
impl UnsafeUnpin for SpringDesc
impl UnwindSafe for SpringDesc
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.