UNPKG

@mousepox/math

Version:

Math-related objects and utilities

16 lines (15 loc) 259 B
export class BitFlags { value; constructor(value) { this.value = value ?? 0; } clear() { this.value = 0; } set(mask) { this.value |= mask; } has(mask) { return (this.value & mask) !== 0; } }