We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
IS_LE
1 parent a54ca91 commit 21646afCopy full SHA for 21646af
packages/binary/src/float.ts
@@ -1,16 +1,7 @@
1
// SPDX-License-Identifier: Apache-2.0
2
import type { FnN, FnN2, FnN3 } from "@thi.ng/api";
3
-
4
-const F64 = new Float64Array(1);
5
-const F32 = new Float32Array(F64.buffer);
6
-const U8 = new Uint8Array(F64.buffer);
7
-const I32 = new Int32Array(F64.buffer);
8
-const U32 = new Uint32Array(F64.buffer);
9
10
-/**
11
- * This value is true iff the environment is Little Endian.
12
- */
13
-export const IS_LE = ((U32[0] = 1), U8[0] === 1);
+import { IS_LE } from "./endianess.js";
+import { F32, F64, I32, U32 } from "./buffers.js";
14
15
export const floatToIntBits: FnN = (x) => ((F32[0] = x), I32[0]);
16
0 commit comments