diff --git a/packages/math/src/math.js b/packages/math/src/math.js index 2449cc0..5b9eb79 100644 --- a/packages/math/src/math.js +++ b/packages/math/src/math.js @@ -70,12 +70,11 @@ export const normalizeAngleRange = (min, max) => { /* eslint-enable no-param-reassign */ }; export const randomNumber = (min, max) => { - /* eslint-disable no-param-reassign */ if (min > max) { + // eslint-disable-next-line no-param-reassign [max, min] = [min, max]; } return min + Math.random() * (max - min); - /* eslint-enable no-param-reassign */ }; export const sub = (l, r) => l - r; export const toRad = (a) => (a % 360) * PI_180;