Instance Method

signum()

Returns -1 if this value is negative and 1 if it’s positive; otherwise, 0.

Required. Default implementation provided.

Declaration

func signum() -> Self

Return Value

The sign of this number, expressed as an integer of the same type.

Default Implementations

BinaryInteger Implementations

func signum() -> Self

Returns -1 if this value is negative and 1 if it’s positive; otherwise, 0.