SpringDescription

Struct SpringDescription 

Source
pub struct SpringDescription<Scalar> {
    pub frequency: Scalar,
    pub damping: Scalar,
    pub initial_response: Scalar,
}
Expand description

An intuitive description of the spring system from which SpringParameters can be built (Using Into::into)

Fields§

§frequency: Scalar

f, the natural frequency

Corresponds to:

  • The speed at which the system responds to changes in input
  • The frequency at which the system will vibrate
§damping: Scalar

Zeta, the damping coefficient

Describes how fast the system settles to its target:

  • 0 (undamped): vibration never dies
  • 0 < Zeta <= 1 (underdamped): vibration dies
  • Zeta > 1: system does not vibrate, but approaches its target
§initial_response: Scalar

r, the initial response

  • Negative: system anticipates motion by going in the opposite direction shortly
  • 0: system takes time to begin accelerating from rest
  • Positive: system immediately reacts to changes
  • r > 1: system overshoots target at first

Trait Implementations§

Source§

impl<S> From<SpringDescription<S>> for SpringParameters<S>
where S: Copy + Scalar + Add<Output = S> + Sub<Output = S> + Mul<Output = S> + Div<Output = S>,

Source§

fn from(description: SpringDescription<S>) -> SpringParameters<S>

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<Scalar> Freeze for SpringDescription<Scalar>
where Scalar: Freeze,

§

impl<Scalar> RefUnwindSafe for SpringDescription<Scalar>
where Scalar: RefUnwindSafe,

§

impl<Scalar> Send for SpringDescription<Scalar>
where Scalar: Send,

§

impl<Scalar> Sync for SpringDescription<Scalar>
where Scalar: Sync,

§

impl<Scalar> Unpin for SpringDescription<Scalar>
where Scalar: Unpin,

§

impl<Scalar> UnwindSafe for SpringDescription<Scalar>
where Scalar: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.