MCPcopy Create free account
hub / github.com/Tencent/puerts / writeInt64

Function writeInt64

unreal/Puerts/Content/JavaScript/ffi/buffer-ext.js:266–281  ·  view source on GitHub ↗
(buff, val, offset = 0)

Source from the content-addressed store, hash-verified

264}
265
266function writeInt64(buff, val, offset = 0) {
267 val = +val;
268 if (typeof val === 'number') val = BigInt(val);
269 checkBounds(buff, offset, 7);
270
271 bigInt64Array[0] = val;
272 buff[offset++] = uint8BigInt64Array[0];
273 buff[offset++] = uint8BigInt64Array[1];
274 buff[offset++] = uint8BigInt64Array[2];
275 buff[offset++] = uint8BigInt64Array[3];
276 buff[offset++] = uint8BigInt64Array[4];
277 buff[offset++] = uint8BigInt64Array[5];
278 buff[offset++] = uint8BigInt64Array[6];
279 buff[offset++] = uint8BigInt64Array[7];
280 return offset;
281}
282
283const bigUint64Array = new BigUint64Array(1);
284const uint8BigUint64Array = new Uint8Array(bigUint64Array.buffer);

Callers

nothing calls this directly

Calls 2

checkBoundsFunction · 0.85
BigIntClass · 0.50

Tested by

no test coverage detected