This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension BinaryInteger { | |
/// Returns true if and only if this integer is even. | |
var isEven: Bool { return self % 2 == 0 } | |
/// Returns true if and only if this integer is odd. | |
var isOdd: Bool { return self % 2 != 0 } | |
} |