pub fn binary_prefix(value: f64) -> (f64, &'static str)
Expand description
Returns given value as binary prefix with corresponding value.
Uses 1024-based prefixes Ki
, Mi
, Gi
, …, Yi
.
§Examples
assert_eq!(ml_progress::binary_prefix(2048.0), (2.0, "Ki"));