Skip to main content

format_with_decimals_in_range

Function format_with_decimals_in_range 

Source
pub fn format_with_decimals_in_range(
    value: f64,
    decimal_range: RangeInclusive<usize>,
) -> String
Available on crate feature egui only.
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.