Improve BitMaskI

This commit is contained in:
2021-03-20 00:54:01 +01:00
parent c9879be72c
commit d03b585372
4 changed files with 12 additions and 8 deletions

View File

@@ -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