mirror of
https://github.com/S2-/minifyfromhtml.git
synced 2025-08-03 20:30:04 +02:00
add some packages
This commit is contained in:
18
node_modules/core-js/modules/_math-scale.js
generated
vendored
Normal file
18
node_modules/core-js/modules/_math-scale.js
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
// https://rwaldron.github.io/proposal-math-extensions/
|
||||
module.exports = Math.scale || function scale(x, inLow, inHigh, outLow, outHigh) {
|
||||
if (
|
||||
arguments.length === 0
|
||||
// eslint-disable-next-line no-self-compare
|
||||
|| x != x
|
||||
// eslint-disable-next-line no-self-compare
|
||||
|| inLow != inLow
|
||||
// eslint-disable-next-line no-self-compare
|
||||
|| inHigh != inHigh
|
||||
// eslint-disable-next-line no-self-compare
|
||||
|| outLow != outLow
|
||||
// eslint-disable-next-line no-self-compare
|
||||
|| outHigh != outHigh
|
||||
) return NaN;
|
||||
if (x === Infinity || x === -Infinity) return x;
|
||||
return (x - inLow) * (outHigh - outLow) / (inHigh - inLow) + outLow;
|
||||
};
|
Reference in New Issue
Block a user