Skip to content

Home > @esengine/ecs-framework-monorepo > BitMask64Utils

BitMask64Utils class

Signature:

typescript
export declare class BitMask64Utils

Properties

Property

Modifiers

Type

Description

ZERO

static

readonly

BitMask64Data

零掩码常量,所有位都为0

Methods

Method

Modifiers

Description

andInPlace(target, other)

static

对目标掩码执行按位与操作

clear(mask)

static

清除掩码的所有位为0

clearBit(mask, bitIndex)

static

清除掩码中指定位为0

clone(mask)

static

创建掩码的深拷贝

copy(source, target)

static

将源掩码的值复制到目标掩码

create(bitIndex)

static

根据位索引创建64位掩码

equals(a, b)

static

检查两个掩码是否相等

fromNumber(value)

static

从32位数字创建64位掩码

hasAll(mask, bits)

static

检查掩码是否包含所有指定的位

hasAny(mask, bits)

static

检查掩码是否包含任意指定的位

hasNone(mask, bits)

static

检查掩码是否不包含任何指定的位

isZero(mask)

static

检查掩码是否为零

orInPlace(target, other)

static

对目标掩码执行按位或操作

popCount(mask)

static

计算掩码中设置为1的位数

setBit(mask, bitIndex)

static

设置掩码中指定位为1

toString(mask, radix)

static

将掩码转换为字符串表示

xorInPlace(target, other)

static

对目标掩码执行按位异或操作

基于 MIT 许可证发布