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

Function writeFloat

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

Source from the content-addressed store, hash-verified

196}
197
198function writeFloat(buff, val, offset = 0) {
199 val = +val;
200 checkBounds(buff, offset, 3);
201
202 float32Array[0] = val;
203 buff[offset++] = uInt8Float32Array[0];
204 buff[offset++] = uInt8Float32Array[1];
205 buff[offset++] = uInt8Float32Array[2];
206 buff[offset++] = uInt8Float32Array[3];
207 return offset;
208}
209
210const float64Array = new Float64Array(1);
211const uInt8Float64Array = new Uint8Array(float64Array.buffer);

Callers

nothing calls this directly

Calls 1

checkBoundsFunction · 0.85

Tested by

no test coverage detected