Skip to main content

round

Function round 

Source
pub const fn round(x: Real) -> Real
Expand description

Const-compatible version of f64::round (rounds to the nearest integer).

Half-way cases round away from zero (0.51.0, -0.5-1.0). Values with magnitude ≥ 2^52 are returned unchanged (already integral at this precision).