MCPcopy Create free account
hub / github.com/Marus/cortex-debug / parseFloat

Function parseFloat

src/frontend/swo/decoders/utils.ts:7–16  ·  view source on GitHub ↗
(buffer: Buffer)

Source from the content-addressed store, hash-verified

5const FloatParser = new Parser().endianess('little').floatle('value');
6
7export function parseFloat(buffer: Buffer): number {
8 if (buffer.length < 4) {
9 const tmp = Buffer.alloc(4);
10 buffer.copy(tmp);
11 buffer = tmp;
12 }
13
14 const result = FloatParser.parse(buffer);
15 return result.value;
16}
17
18export function parseSigned(buffer: Buffer): number {
19 if (buffer.length < 4) {

Callers 1

getHTMLCommonFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected