Skip to main content

copysign

Function copysign 

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

Copies the sign from y to x for floating-point values.

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