@ptolemy2002/js-math-utils 2.0.1 → 2.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +2 -7
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -10,11 +10,6 @@ function clamp(value, { min = null, max = null } = {}) {
10
10
  return value;
11
11
  }
12
12
  function wrapNumber(n, min, max) {
13
- const range = max - min;
14
- return ((n - range) % range === 0 ?
15
- min
16
- : n >= min ?
17
- min + (n - min) % range
18
- :
19
- max + (n - min) % range);
13
+ const range = max - min + 1;
14
+ return (n - min + range) % range + min;
20
15
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ptolemy2002/js-math-utils",
3
- "version": "2.0.1",
3
+ "version": "2.0.3",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",