Function ceil

Source
pub fn ceil(x: f32) -> f32
🔬This is a nightly-only experimental API. (core_float_math)
Expand description

Experimental version of ceil in core. See f32::ceil for details.

§Examples

#![feature(core_float_math)]

use core::f32;

let f = 3.01_f32;
let g = 4.0_f32;

assert_eq!(f32::ceil(f), 4.0);
assert_eq!(f32::ceil(g), 4.0);

This standalone function is for testing only. It will be stabilized as an inherent method.