Skip to content

Commit

Permalink
inline internals/math-f16round
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed Nov 21, 2024
1 parent 7ee7986 commit 5c7cc53
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
12 changes: 0 additions & 12 deletions packages/core-js/internals/math-f16round.js

This file was deleted.

12 changes: 10 additions & 2 deletions packages/core-js/modules/esnext.math.f16round.js
Original file line number Diff line number Diff line change
@@ -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);
}
});

0 comments on commit 5c7cc53

Please sign in to comment.