[][src]Struct raylib::ease::Tween

pub struct Tween { /* fields omitted */ }

A manager for a tween on a single f32 value.

Methods

impl Tween[src]

pub fn new(
    easer: EaseFn,
    start_value: f32,
    end_value: f32,
    duration: f32
) -> Tween
[src]

Creates a new Tween given the easing function, value bounds, and duration.

pub fn reset(&mut self)[src]

Resets the tween to the beginning.

pub fn has_completed(&self) -> bool[src]

Returns true if the tween has completed.

pub fn apply(&mut self, time_advance: f32) -> f32[src]

Returns the new value after applying the tween, advancing time by time_advance.

pub fn reverse(&mut self)[src]

Reverses the tween, adjusting the current time position such that it will retrace its steps so far.

pub fn current_time(&self) -> f32[src]

Returns the current time position of the tween.

pub fn start_value(&self) -> f32[src]

Returns the starting value of the tween.

pub fn end_value(&self) -> f32[src]

Returns the ending value of the tween.

pub fn duration(&self) -> f32[src]

Returns the duration of the tween.

Auto Trait Implementations

impl RefUnwindSafe for Tween

impl Send for Tween

impl Sync for Tween

impl Unpin for Tween

impl UnwindSafe for Tween

Blanket Implementations

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> 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.