[][src]Struct polyhorn_ui::physics::Velocity

pub struct Velocity<T> { /* fields omitted */ }

Represents dy/dt. This type is mostly used for events that involve movement, such as scroll events.

Implementations

impl<T> Velocity<T>[src]

pub fn new(delta: T, time: Duration) -> Velocity<T>[src]

Returns a new velocity with the given delta within the given timeframe.

pub fn into_per_second<X, O>(self) -> O where
    X: From<f32>,
    T: Div<X, Output = O>, 
[src]

Returns the velocity in O per second where O is the result of dividing T by a f32 that represents the duration of this velocity sample.

Auto Trait Implementations

impl<T> RefUnwindSafe for Velocity<T> where
    T: RefUnwindSafe

impl<T> Send for Velocity<T> where
    T: Send

impl<T> Sync for Velocity<T> where
    T: Sync

impl<T> Unpin for Velocity<T> where
    T: Unpin

impl<T> UnwindSafe for Velocity<T> where
    T: UnwindSafe

Blanket Implementations

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
    D: AdaptFrom<S, Swp, Dwp, T>,
    Dwp: WhitePoint,
    Swp: WhitePoint,
    T: Component + Float
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> ConvertInto<U> for T where
    U: ConvertFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.