Skip to main content

scale

Function scale 

Source
pub const fn scale(val: f64) -> (f64, &'static str)
Expand description

Scales down a value by powers of 1000, returning the scaled value and the associated SI prefix.

For example, scale(1234.0) returns (1.234, "k"). Values of a septillion (10²⁴) or more are all scaled to yottas (Y).