MCPcopy Create free account
hub / github.com/esengine/esengine / set

Method set

packages/core/src/ECS/Utils/Bits.ts:34–40  ·  view source on GitHub ↗

* 设置指定位为1 * 自动扩展:当索引超过 64 时,自动扩展到 128/256 位 * @param index 位索引(0-based) * @throws 当位索引为负数时抛出错误

(index: number)

Source from the content-addressed store, hash-verified

32 * @throws 当位索引为负数时抛出错误
33 */
34 public set(index: number): void {
35 if (index < 0) {
36 throw new Error('Bit index cannot be negative');
37 }
38
39 BitMask64Utils.setBit(this._value, index);
40 }
41
42 /**
43 * 清除指定位为0

Callers

nothing calls this directly

Calls 1

setBitMethod · 0.45

Tested by

no test coverage detected