Improve BitMaskI
This commit is contained in:
@@ -5,6 +5,7 @@ interface BitMaskI {
|
||||
|
||||
infix operator fun contains(which: BitMaskI): Boolean = bit and which.bit == which.bit
|
||||
infix operator fun plus(mask: BitMaskI): BitMaskI = BitMask(mask.bit and this.bit)
|
||||
infix operator fun minus(mask: BitMaskI): BitMaskI = BitMask(this.bit - mask.bit)
|
||||
}
|
||||
|
||||
class BitMask(override val bit: Long) : BitMaskI
|
||||
|
||||
Reference in New Issue
Block a user