format_number

Function format_number 

Source
pub fn format_number(num: f32, precision: usize) -> String
Expand description

Formats num to the given precision only when necessary. If the rounded value has no fractional part, it is returned without decimals.