Function friendly::sigfig::sigscale[][src]

pub fn sigscale(val: f64, sf: usize) -> (f64, usize)
Expand description

Adjust a value for the specified number of significant figures.

Returns a tuple of the adjusted value (rounded as appropriate) and the number of values after the decimal point needed to display it.