tempa 0.1.13

A no_std temporal system for animation and simulation, providing time, duration, time ranges, frame rates, and deterministic frame-index stepping.
Documentation
1
2
3
4
5
6
7
8
9
10
use crate::{Duration, TimeRange};

/// Trait for values that expose a [TimeRange].
pub trait HasTimeRange<T> {
    /// Returns this value's [TimeRange], if applicable.
    fn time_range(&self) -> Option<TimeRange<T>>;

    /// Returns this value's [Duration], if applicable.
    fn duration(&self) -> Option<Duration<T>>;
}