pub fn v2s_f32_rounded(
    digits: usize
) -> Arc<dyn Fn(f32) -> String + Send + Sync>
Expand description

Round an f32 value to always have a specific number of decimal digits. Avoids returning negative zero values to make sure string->value->string roundtrips work correctly. Otherwise -0.001 rounded to two digits would result in -0.00.