Skip to content

Commit

Permalink
doc symmetry
Browse files Browse the repository at this point in the history
  • Loading branch information
maniwani committed Oct 20, 2022
1 parent 5eeea40 commit 3476364
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions crates/bevy_time/src/time.rs
Expand Up @@ -281,6 +281,10 @@ impl Time {
}

/// Returns the exact clock time elapsed since [`startup`](#method.startup), as [`f32`] seconds.
///
/// **Note:** This is a monotonically increasing value. It's precision will degrade over time.
/// If you need an `f32` but that precision loss is unacceptable,
/// use [`raw_elapsed_seconds_wrapped`](#method.raw_elapsed_seconds_wrapped).
#[inline]
pub fn raw_elapsed_seconds(&self) -> f32 {
self.raw_elapsed_seconds
Expand All @@ -301,6 +305,9 @@ impl Time {

/// Returns the exact clock time elapsed since [`startup`](#method.startup) modulo
/// the [`wrap_period`](#method.wrap_period), as [`f32`] seconds.
///
/// This method is intended for applications (e.g. shaders) that require an [`f32`] value but
/// suffer from the gradual precision loss of [`elapsed_seconds`](#method.elapsed_seconds).
#[inline]
pub fn raw_elapsed_seconds_wrapped(&self) -> f32 {
self.raw_elapsed_seconds_wrapped
Expand Down

0 comments on commit 3476364

Please sign in to comment.