Skip to main content

format_display_value

Function format_display_value 

Source
pub fn format_display_value(value: f64, precision: Option<usize>) -> String
Expand description

Format a floating-point value for display with optional precision

If precision is Some(p), rounds to p decimal places. Otherwise, shows integer format for whole numbers, or trims trailing zeros.