Function num_traits::sign::signum  
source · pub fn signum<T: Signed>(value: T) -> TExpand description
Returns the sign of the number.
For f32 and f64:
- 1.0if the number is positive,- +0.0or- INFINITY
- -1.0if the number is negative,- -0.0or- NEG_INFINITY
- NaNif the number is- NaN
For signed integers:
- 0if the number is zero
- 1if the number is positive
- -1if the number is negative