diff --git a/packages/core-js/internals/math-f16round.js b/packages/core-js/internals/math-f16round.js deleted file mode 100644 index 89e450a48a3b..000000000000 --- a/packages/core-js/internals/math-f16round.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; -var floatRound = require('../internals/math-float-round'); - -var FLOAT16_EPSILON = 0.0009765625; -var FLOAT16_MAX_VALUE = 65504; -var FLOAT16_MIN_VALUE = 6.103515625e-05; - -// `Math.f16round` method implementation -// https://github.com/tc39/proposal-float16array -module.exports = Math.f16round || function f16round(x) { - return floatRound(x, FLOAT16_EPSILON, FLOAT16_MAX_VALUE, FLOAT16_MIN_VALUE); -}; diff --git a/packages/core-js/modules/esnext.math.f16round.js b/packages/core-js/modules/esnext.math.f16round.js index 09a3e012998a..61dd678801b4 100644 --- a/packages/core-js/modules/esnext.math.f16round.js +++ b/packages/core-js/modules/esnext.math.f16round.js @@ -1,7 +1,15 @@ 'use strict'; var $ = require('../internals/export'); -var f16round = require('../internals/math-f16round'); +var floatRound = require('../internals/math-float-round'); + +var FLOAT16_EPSILON = 0.0009765625; +var FLOAT16_MAX_VALUE = 65504; +var FLOAT16_MIN_VALUE = 6.103515625e-05; // `Math.f16round` method // https://github.com/tc39/proposal-float16array -$({ target: 'Math', stat: true }, { f16round: f16round }); +$({ target: 'Math', stat: true }, { + f16round: function f16round(x) { + return floatRound(x, FLOAT16_EPSILON, FLOAT16_MAX_VALUE, FLOAT16_MIN_VALUE); + } +});