Skip to content

Commit 5c7cc53

Browse files
committed
inline internals/math-f16round
1 parent 7ee7986 commit 5c7cc53

File tree

2 files changed

+10
-14
lines changed

2 files changed

+10
-14
lines changed

packages/core-js/internals/math-f16round.js

-12
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
'use strict';
22
var $ = require('../internals/export');
3-
var f16round = require('../internals/math-f16round');
3+
var floatRound = require('../internals/math-float-round');
4+
5+
var FLOAT16_EPSILON = 0.0009765625;
6+
var FLOAT16_MAX_VALUE = 65504;
7+
var FLOAT16_MIN_VALUE = 6.103515625e-05;
48

59
// `Math.f16round` method
610
// https://github.com/tc39/proposal-float16array
7-
$({ target: 'Math', stat: true }, { f16round: f16round });
11+
$({ target: 'Math', stat: true }, {
12+
f16round: function f16round(x) {
13+
return floatRound(x, FLOAT16_EPSILON, FLOAT16_MAX_VALUE, FLOAT16_MIN_VALUE);
14+
}
15+
});

0 commit comments

Comments
 (0)