MCPcopy Create free account
hub / github.com/GamerHack/GamerHack.github.io / write64

Function write64

g2all/700/module/rw.js:131–145  ·  view source on GitHub ↗
(u8_view, offset, value)

Source from the content-addressed store, hash-verified

129}
130
131export function write64(u8_view, offset, value) {
132 if (!(value instanceof Int)) {
133 throw TypeError("write64 value must be an Int");
134 }
135
136 let low = value.lo;
137 let high = value.hi;
138
139 for (let i = 0; i < 4; i++) {
140 u8_view[offset + i] = (low >>> (i * 8)) & 0xff;
141 }
142 for (let i = 0; i < 4; i++) {
143 u8_view[offset + 4 + i] = (high >>> (i * 8)) & 0xff;
144 }
145}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected