signum()
Returns -1 if this value is negative and 1 if it’s positive; otherwise, 0.
Declaration
func signum() -> UIntReturn Value
The sign of this number, expressed as an integer of the same type.
Returns -1 if this value is negative and 1 if it’s positive; otherwise, 0.
func signum() -> UIntThe sign of this number, expressed as an integer of the same type.