MCPcopy Create free account
hub / github.com/nodejs/node / Module

Function Module

deps/v8/test/mjsunit/asm/math-abs.js:5–29  ·  view source on GitHub ↗
(stdlib)

Source from the content-addressed store, hash-verified

3// found in the LICENSE file.
4
5function Module(stdlib) {
6 "use asm";
7
8 var abs = stdlib.Math.abs;
9
10 // f: double -> double
11 function f(a) {
12 a = +a;
13 return +abs(a);
14 }
15
16 // g: unsigned -> double
17 function g(a) {
18 a = a | 0;
19 return +abs(+(a >>> 0));
20 }
21
22 // h: signed -> double
23 function h(a) {
24 a = a|0;
25 return +abs(+(a | 0));
26 }
27
28 return { f: f, g: g, h: h };
29}
30
31var m = Module({ Math: Math });
32var f = m.f;

Callers 1

math-abs.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected