Skip to main content

trunc

Function trunc 

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

Returns the integer part of a floating-point value.

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