Returns -1
if this value is negative and 1
if it’s positive; otherwise, 0
.
SDK
- Xcode 7.1+
Framework
- Swift Standard Library
Declaration
func signum() -> UInt16
Return 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
.
SDK
Framework
func signum() -> UInt16
The sign of this number, expressed as an integer of the same type.