@thi.ng/ramp 3.3.11 → 3.3.12

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 +10 -1
  2. package/package.json +2 -2
  3. package/ramp.js +2 -1
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2024-12-12T10:11:58Z
3
+ - **Last updated**: 2024-12-13T12:48:33Z
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.
@@ -9,6 +9,15 @@ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelin
9
9
  **Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
10
10
  and/or version bumps of transitive dependencies.
11
11
 
12
+ ### [3.3.12](https://github.com/thi-ng/umbrella/tree/@thi.ng/ramp@3.3.12) (2024-12-13)
13
+
14
+ #### 🩹 Bug fixes
15
+
16
+ - fix [#494](https://github.com/thi-ng/umbrella/issues/494), update time index search ([39a504b](https://github.com/thi-ng/umbrella/commit/39a504b))
17
+ - update `Ramp.timeIndex()`
18
+ - add tests
19
+ - thanks to @robertoranon for reporting
20
+
12
21
  ## [3.3.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/ramp@3.3.0) (2024-09-05)
13
22
 
14
23
  #### 🚀 Features
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/ramp",
3
- "version": "3.3.11",
3
+ "version": "3.3.12",
4
4
  "description": "Extensible keyframe interpolation/tweening of arbitrary, nested types",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -120,5 +120,5 @@
120
120
  "thi.ng": {
121
121
  "year": 2019
122
122
  },
123
- "gitHead": "34ac95538d96f046090fef5fd3a1dc36d54663d5\n"
123
+ "gitHead": "528f77dfa5fe32a8f8d3d7c56aa696d3a6917546\n"
124
124
  }
package/ramp.js CHANGED
@@ -114,12 +114,13 @@ class Ramp {
114
114
  }
115
115
  return -1;
116
116
  }
117
- return binarySearch(
117
+ const idx = binarySearch(
118
118
  stops,
119
119
  [t, null],
120
120
  (x) => x[0],
121
121
  compareNumAsc
122
122
  );
123
+ return idx < -1 ? -(idx + 2) : idx;
123
124
  }
124
125
  }
125
126
  export {