Function tract_hir::internal::tract_num_traits::sign::signum    [−][src]
pub fn signum<T>(value: T) -> T where
    T: Signed, Expand description
Returns the sign of the number.
For f32 and f64:
1.0if the number is positive,+0.0orINFINITY-1.0if the number is negative,-0.0orNEG_INFINITYNaNif the number isNaN
For signed integers:
0if the number is zero1if the number is positive-1if the number is negative