---
title: signum()
framework: swift
role: symbol
role_heading: Instance Method
path: swift/int/signum()
---

# signum()

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

## Declaration

```swift
func signum() -> Int
```

## Return Value

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

## See Also

### Finding the Sign and Magnitude

- [magnitude](swift/int/magnitude-swift.property.md)
- [Int.Magnitude](swift/int/magnitude-swift.typealias.md)
- [abs(_:)](swift/abs(_:).md)
