@thi.ng/ramp 3.1.21 → 3.1.23

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 (3) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/package.json +13 -13
  3. package/ramp.js +2 -4
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2024-04-23T07:02:18Z
3
+ - **Last updated**: 2024-05-08T18:24:32Z
4
4
  - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
5
5
 
6
6
  All notable changes to this project will be documented in this file.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/ramp",
3
- "version": "3.1.21",
3
+ "version": "3.1.23",
4
4
  "description": "Extensible keyframe interpolation/tweening of arbitrary, nested types",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -36,19 +36,19 @@
36
36
  "tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
37
37
  },
38
38
  "dependencies": {
39
- "@thi.ng/api": "^8.11.1",
40
- "@thi.ng/arrays": "^2.9.5",
41
- "@thi.ng/compare": "^2.3.4",
42
- "@thi.ng/errors": "^2.5.6",
43
- "@thi.ng/math": "^5.10.12",
44
- "@thi.ng/transducers": "^9.0.3",
45
- "@thi.ng/vectors": "^7.10.29"
39
+ "@thi.ng/api": "^8.11.2",
40
+ "@thi.ng/arrays": "^2.9.6",
41
+ "@thi.ng/compare": "^2.3.5",
42
+ "@thi.ng/errors": "^2.5.7",
43
+ "@thi.ng/math": "^5.10.13",
44
+ "@thi.ng/transducers": "^9.0.5",
45
+ "@thi.ng/vectors": "^7.10.31"
46
46
  },
47
47
  "devDependencies": {
48
- "@microsoft/api-extractor": "^7.43.0",
49
- "esbuild": "^0.20.2",
50
- "typedoc": "^0.25.12",
51
- "typescript": "^5.4.3"
48
+ "@microsoft/api-extractor": "^7.43.2",
49
+ "esbuild": "^0.21.1",
50
+ "typedoc": "^0.25.13",
51
+ "typescript": "^5.4.5"
52
52
  },
53
53
  "keywords": [
54
54
  "1d",
@@ -117,5 +117,5 @@
117
117
  "thi.ng": {
118
118
  "year": 2019
119
119
  },
120
- "gitHead": "5dd66c18a3862a3af69a5b2f49563f7cbdd960c2\n"
120
+ "gitHead": "df34b4a9e650cc7323575356de207d78933bdcf3\n"
121
121
  }
package/ramp.js CHANGED
@@ -100,8 +100,7 @@ class Ramp {
100
100
  closestIndex(t, eps = 0.01) {
101
101
  const stops = this.stops;
102
102
  for (let i = stops.length; i-- > 0; ) {
103
- if (absDiff(t, stops[i][0]) < eps)
104
- return i;
103
+ if (absDiff(t, stops[i][0]) < eps) return i;
105
104
  }
106
105
  return -1;
107
106
  }
@@ -122,8 +121,7 @@ class Ramp {
122
121
  const n = stops.length;
123
122
  if (n < 256) {
124
123
  for (let i = n; i-- > 0; ) {
125
- if (t >= stops[i][0])
126
- return i;
124
+ if (t >= stops[i][0]) return i;
127
125
  }
128
126
  return -1;
129
127
  }