# SignedInteger

``public extension SignedInteger``
• ``` abs ```

SwifterSwift: Absolute value of integer number.

#### Declaration

Swift

``var abs: Self { get }``
• ``` isPositive ```

SwifterSwift: Check if integer is positive.

#### Declaration

Swift

``var isPositive: Bool { get }``
• ``` isNegative ```

SwifterSwift: Check if integer is negative.

#### Declaration

Swift

``var isNegative: Bool { get }``
• ``` isEven ```

SwifterSwift: Check if integer is even.

#### Declaration

Swift

``var isEven: Bool { get }``
• ``` isOdd ```

SwifterSwift: Check if integer is odd.

#### Declaration

Swift

``var isOdd: Bool { get }``
• ``` timeString ```

SwifterSwift: String of format (XXh XXm) from seconds Int.

#### Declaration

Swift

``var timeString: String { get }``

### Methods

• ``` gcd(of:) ```

SwifterSwift: Greatest common divisor of integer value and n.

#### Declaration

Swift

``func gcd(of number: Self) -> Self``

#### Parameters

 ``` number ``` integer value to find gcd with.

#### Return Value

greatest common divisor of self and n.

• ``` lcm(of:) ```

SwifterSwift: Least common multiple of integer and n.

#### Declaration

Swift

``func lcm(of number: Self) -> Self``

#### Parameters

 ``` number ``` integer value to find lcm with.

#### Return Value

least common multiple of self and n.

• ``` ordinalString(locale:) ```

SwifterSwift: Ordinal representation of an integer.

``````   print((12).ordinalString()) // prints "12th"
``````

#### Declaration

Swift

``````@available(OSX 10.11, *)
func ordinalString(locale: Locale = .current) -> String?``````

#### Parameters

 ``` locale ``` locale, default is .current.

#### Return Value

string ordinal representation of number in specified locale language. E.g. input 92, output in “en”: “92nd”.