emath

Function format_with_decimals_in_range

Source
pub fn format_with_decimals_in_range(
    value: f64,
    decimal_range: RangeInclusive<usize>,
) -> String
Expand description

Use as few decimals as possible to show the value accurately, but within the given range.

Decimals are counted after the decimal point.