main
Last change
on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
458 bytes
|
Line | |
---|
1 | 'use strict';
|
---|
2 | var $ = require('../internals/export');
|
---|
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;
|
---|
8 |
|
---|
9 | // `Math.f16round` method
|
---|
10 | // https://github.com/tc39/proposal-float16array
|
---|
11 | $({ target: 'Math', stat: true }, {
|
---|
12 | f16round: function f16round(x) {
|
---|
13 | return floatRound(x, FLOAT16_EPSILON, FLOAT16_MAX_VALUE, FLOAT16_MIN_VALUE);
|
---|
14 | }
|
---|
15 | });
|
---|
Note:
See
TracBrowser
for help on using the repository browser.