esnext.math.fscale.js 388 B

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