.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / core-js / internals / math-scale.js
1 // `Math.scale` method implementation
2 // https://rwaldron.github.io/proposal-math-extensions/
3 module.exports = Math.scale || function scale(x, inLow, inHigh, outLow, outHigh) {
4   if (
5     arguments.length === 0
6       /* eslint-disable no-self-compare -- NaN check */
7       || x != x
8       || inLow != inLow
9       || inHigh != inHigh
10       || outLow != outLow
11       || outHigh != outHigh
12       /* eslint-enable no-self-compare -- NaN check */
13   ) return NaN;
14   if (x === Infinity || x === -Infinity) return x;
15   return (x - inLow) * (outHigh - outLow) / (inHigh - inLow) + outLow;
16 };