main
Last change
on this file since d24f17c was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
412 bytes
|
Line | |
---|
1 | 'use strict';
|
---|
2 | var floatRound = require('../internals/math-float-round');
|
---|
3 |
|
---|
4 | var FLOAT16_EPSILON = 0.0009765625;
|
---|
5 | var FLOAT16_MAX_VALUE = 65504;
|
---|
6 | var FLOAT16_MIN_VALUE = 6.103515625e-05;
|
---|
7 |
|
---|
8 | // `Math.f16round` method implementation
|
---|
9 | // https://github.com/tc39/proposal-float16array
|
---|
10 | module.exports = Math.f16round || function f16round(x) {
|
---|
11 | return floatRound(x, FLOAT16_EPSILON, FLOAT16_MAX_VALUE, FLOAT16_MIN_VALUE);
|
---|
12 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.