pub fn copysign<T: Real>(a: T, b: T) -> T
Copy the sign of b to the magnitude of a.
b
a
use mathverse_core::ops::copysign; assert_eq!(copysign(3.0, -1.0), -3.0); assert_eq!(copysign(3.0, 1.0), 3.0);