esnext.math.fscale.js 416 B

12345678910111213
  1. 'use strict';
  2. var $ = require('../internals/export');
  3. var scale = require('../internals/math-scale');
  4. var fround = require('../internals/math-fround');
  5. // `Math.fscale` method
  6. // https://rwaldron.github.io/proposal-math-extensions/
  7. $({ target: 'Math', stat: true, forced: true }, {
  8. fscale: function fscale(x, inLow, inHigh, outLow, outHigh) {
  9. return fround(scale(x, inLow, inHigh, outLow, outHigh));
  10. }
  11. });