Skip to main content

push_fraction

Function push_fraction 

Source
pub(crate) fn push_fraction(out: &mut Vec<u8>, value: u32, width: usize)
Expand description

Appends . and value as exactly width decimal digits, zero-padded, like write!(out, ".{value:0width$}") for a value below 10^width.

ยงArguments

  • out - Buffer the text is appended to.
  • value - Fraction of a second in units of 10^-width s.
  • width - Number of digits, at most 9.