@mousepox/math
Version:
Math-related objects and utilities
19 lines (18 loc) • 410 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.BitFlags = void 0;
class BitFlags {
constructor(value) {
this.value = value !== null && value !== void 0 ? value : 0;
}
clear() {
this.value = 0;
}
set(mask) {
this.value |= mask;
}
has(mask) {
return (this.value & mask) !== 0;
}
}
exports.BitFlags = BitFlags;