# Int

``public extension Int``
• ``` countableRange ```

SwifterSwift: CountableRange 0..<Int.

#### Declaration

Swift

``var countableRange: CountableRange<Int> { get }``
• ``` degreesToRadians ```

SwifterSwift: Radian value of degree input.

#### Declaration

Swift

``var degreesToRadians: Double { get }``
• ``` radiansToDegrees ```

SwifterSwift: Degree value of radian input

#### Declaration

Swift

``var radiansToDegrees: Double { get }``
• ``` uInt ```

SwifterSwift: UInt.

#### Declaration

Swift

``var uInt: UInt { get }``
• ``` double ```

SwifterSwift: Double.

#### Declaration

Swift

``var double: Double { get }``
• ``` float ```

SwifterSwift: Float.

#### Declaration

Swift

``var float: Float { get }``
• ``` cgFloat ```

SwifterSwift: CGFloat.

#### Declaration

Swift

``var cgFloat: CGFloat { get }``
• ``` kFormatted ```

SwifterSwift: String formatted for values over ±1000 (example: 1k, -2k, 100k, 1kk, -5kk..)

#### Declaration

Swift

``var kFormatted: String { get }``
• ``` digits ```

SwifterSwift: Array of digits of integer value.

#### Declaration

Swift

``var digits: [Int] { get }``
• ``` digitsCount ```

SwifterSwift: Number of digits of integer value.

#### Declaration

Swift

``var digitsCount: Int { get }``

### Methods

• ``` isPrime() ```

SwifterSwift: check if given integer prime or not. Warning: Using big numbers can be computationally expensive!

#### Declaration

Swift

``func isPrime() -> Bool``

#### Return Value

true or false depending on prime-ness

• ``` romanNumeral() ```

SwifterSwift: Roman numeral string from integer (if applicable).

``````10.romanNumeral() -> "X"
``````

#### Declaration

Swift

``func romanNumeral() -> String?``

#### Return Value

The roman numeral string.

• ``` roundToNearest(_:) ```

SwifterSwift: Rounds to the closest multiple of n

#### Declaration

Swift

``func roundToNearest(_ number: Int) -> Int``