Skip to main content

fabs

Function fabs 

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

Returns the absolute value of a floating-point value.

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