Skip to main content

round_to

Function round_to 

Source
pub fn round_to(x: f64, ndigits: usize) -> f64
Expand description

round(x, ndigits): correctly rounded on the binary value, ties to even — the same digits CPython’s float.__round__ produces.