diff --git a/system/lib/jsmath.c b/system/lib/jsmath.c index b6a7ff3a80b82..167d27bc7098a 100644 --- a/system/lib/jsmath.c +++ b/system/lib/jsmath.c @@ -23,9 +23,6 @@ CALL_JS_1_TRIPLE(atan, Math.atan) CALL_JS_1_TRIPLE(exp, Math.exp) CALL_JS_1_TRIPLE(log, Math.log) CALL_JS_1_TRIPLE(sqrt, Math.sqrt) -CALL_JS_1_TRIPLE(fabs, Math.abs) -CALL_JS_1_TRIPLE(ceil, Math.ceil) -CALL_JS_1_TRIPLE(floor, Math.floor) #define CALL_JS_2(cname, jsname, type, casttype) \ EM_JS(type, JS_##cname, (type x, type y), { return jsname(x, y) }); \ @@ -50,11 +47,6 @@ CALL_JS_1_IMPL_TRIPLE(round, { return x >= 0 ? Math.floor(x + 0.5) : Math.ceil(x - 0.5); }) CALL_JS_1_IMPL_TRIPLE(rint, { - function round(x) { - return x >= 0 ? Math.floor(x + 0.5) : Math.ceil(x - 0.5); - } + var round(x) => x >= 0 ? Math.floor(x + 0.5) : Math.ceil(x - 0.5); return (x - Math.floor(x) != .5) ? round(x) : round(x / 2) * 2; }) - -double nearbyint(double x) { return rint(x); } -float nearbyintf(float x) { return rintf(x); }