BinaryInteger
protocol BinaryInteger : Hashable, Numeric, CustomStringConvertible, Strideable
-
Mechanica
Determine if self is even (equivalent to
self % 2 == 0
).Declaration
Swift
public var isEven: Bool
-
Mechanica
Determine if self is odd (equivalent to
self % 2 != 0
).Declaration
Swift
public var isOdd: Bool
-
Mechanica
Determine if self is positive (equivalent to
self > 0
).Declaration
Swift
public var isPositive: Bool
-
Mechanica
Determine if self is negative (equivalent to
self < 0
).Declaration
Swift
public var isNegative: Bool