Integer
protocol Integer : _Integer, Strideable
-
Mechanica
Determine if self is even (equivalent to
self % 2 == 0
).Declaration
Swift
public final var isEven: Bool
-
Mechanica
Determine if self is odd (equivalent to
self % 2 != 0
).Declaration
Swift
public final var isOdd: Bool
-
Mechanica
Determine if self is positive (equivalent to
self > 0
).Declaration
Swift
public final var isPositive: Bool
-
Mechanica
Determine if self is negative (equivalent to
self < 0
).Declaration
Swift
public final var isNegative: Bool
-
Mechanica
Returns a random Integer bounded by a closed interval range.
Declaration
Swift
public static func random(in range: CountableClosedRange<Self>) -> Self
-
Mechanica
Returns a random Integer bounded by a closed interval range.
Declaration
Swift
public static func random(in range: CountableRange<Self>) -> Self