Function number_prefix::binary_prefix
[−]
[src]
pub fn binary_prefix<F: Amounts>(amount: F) -> Result<F>
Formats the given floating-point number using binary prefixes, returning a result.
This function accepts both f32
and f64
values. If you’re trying to
format an integer, you’ll have to cast it first.