1
0
Fork 0

Fix the f32_hz_then_khz formatter

This commit is contained in:
Robbert van der Helm 2022-03-21 14:47:30 +01:00
parent 5b2f8a417b
commit b516e5341e

View file

@ -77,7 +77,7 @@ pub fn f32_hz_then_khz(digits: usize) -> Arc<dyn Fn(f32) -> String + Send + Sync
if value < 1000.0 {
format!("{:.digits$} Hz", value)
} else {
format!("{:.digits$} kHz", value / 1000.0, digits = digits.min(1))
format!("{:.digits$} kHz", value / 1000.0, digits = digits.max(1))
}
})
}