-
-
Notifications
You must be signed in to change notification settings - Fork 687
Expand file tree
/
Copy pathfloat.ts
More file actions
30 lines (25 loc) · 614 Bytes
/
float.ts
File metadata and controls
30 lines (25 loc) · 614 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/**
* @fileoverview Floating point glue code for WebAssembly.
* @license Apache-2.0
*/
/* eslint-disable @typescript-eslint/no-unused-vars */
// @ts-ignore: decorator
@global @inline
function f32_as_i32(value: f32): i32 {
return reinterpret<i32>(value);
}
// @ts-ignore: decorator
@global @inline
function i32_as_f32(value: i32): f32 {
return reinterpret<f32>(value);
}
// @ts-ignore: decorator
@global @inline
function f64_as_i64(value: f64): i64 {
return reinterpret<i64>(value);
}
// @ts-ignore: decorator
@global @inline
function i64_as_f64(value: i64): f64 {
return reinterpret<f64>(value);
}