Skip to content

Commit

Permalink
rewording
Browse files Browse the repository at this point in the history
Co-Authored-By: Daniel McNab <36049421+DJMcNab@users.noreply.github.com>
  • Loading branch information
mockersf and DJMcNab committed Jun 1, 2022
1 parent 03a9147 commit 5cf7a6a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/bevy_diagnostic/src/diagnostic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ impl Diagnostic {
self.measurement().map(|measurement| measurement.value)
}

/// If this diagnostic has more than one value, return the average.
/// Return the mean (average) of this diagnostic's values.
/// N.B. this a cheap operation as the sum is cached.
pub fn average(&self) -> Option<f64> {
if !self.history.is_empty() {
Some(self.sum / self.history.len() as f64)
Expand Down

0 comments on commit 5cf7a6a

Please sign in to comment.