Struct radiant_rs::utils::Periodic
[−]
[src]
pub struct Periodic<S = f32, T = S> { /* fields omitted */ }
A generic interval.
Methods
impl<S, T> Periodic<S, T> where
S: Copy + PartialOrd + Add<T> + Sub<T> + Sub<S> + From<<S as Add<T>>::Output> + From<<S as Sub<T>>::Output>,
T: Copy + PartialOrd + Add<T> + From<<S as Sub<S>>::Output>,
[src]
S: Copy + PartialOrd + Add<T> + Sub<T> + Sub<S> + From<<S as Add<T>>::Output> + From<<S as Sub<T>>::Output>,
T: Copy + PartialOrd + Add<T> + From<<S as Sub<S>>::Output>,
fn new(current: S, interval: T) -> Periodic<S, T>
[src]
Returns a new Periodic instance.
fn elapsed(&mut self, current: S) -> bool
[src]
Returns true if the interval has elapsed and subtracts the interval since then from the next interval.
fn accumulated(&mut self, current: S) -> bool
[src]
Returns true if the interval has elapsed and advances by one interval. This function will return true for each interval that has elapsed.
fn peek(&mut self, current: S) -> bool
[src]
Returns true if the interval has elapsed
Trait Implementations
impl<S: Copy, T: Copy> Copy for Periodic<S, T>
[src]
impl<S: Clone, T: Clone> Clone for Periodic<S, T>
[src]
fn clone(&self) -> Periodic<S, T>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<S, T> Debug for Periodic<S, T> where
S: Debug,
T: Debug,
[src]
S: Debug,
T: Debug,