Skip to main content

round

Function round 

Source
pub const fn round<T: Dispatch>(x: T) -> T
🔬This is a nightly-only experimental API. (core_intrinsics)
Expand description

Returns the nearest integer to a floating-point value. Rounds half-way cases away from zero.

The stabilized versions of this intrinsic are available on the float primitives via the round method. For example, f32::round.