lyb-js 1.6.39 → 1.6.40

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.
@@ -22,4 +22,4 @@ export interface LibJsPiecewiseLerpPoint {
22
22
  * console.log(LibJsPiecewiseLerp(points, 9, 0)); // 65
23
23
  * @link 使用方法:https://www.npmjs.com/package/lyb-js#libjspiecewiselerp-分段线性插值
24
24
  */
25
- export declare const LibJsPiecewiseLerp: (points: LibJsPiecewiseLerpPoint[], currentValue: number, edgeValue: number) => number;
25
+ export declare const libJsPiecewiseLerp: (points: LibJsPiecewiseLerpPoint[], currentValue: number, edgeValue: number) => number;
@@ -15,10 +15,11 @@
15
15
  * console.log(LibJsPiecewiseLerp(points, 9, 0)); // 65
16
16
  * @link 使用方法:https://www.npmjs.com/package/lyb-js#libjspiecewiselerp-分段线性插值
17
17
  */
18
- export const LibJsPiecewiseLerp = (points, currentValue, edgeValue) => {
18
+ export const libJsPiecewiseLerp = (points, currentValue, edgeValue) => {
19
19
  if (!points.length)
20
20
  return edgeValue;
21
- if (currentValue < points[0].h || currentValue >= points[points.length - 1].h) {
21
+ if (currentValue < points[0].h ||
22
+ currentValue >= points[points.length - 1].h) {
22
23
  return edgeValue;
23
24
  }
24
25
  for (let i = 0; i < points.length - 1; i++) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lyb-js",
3
- "version": "1.6.39",
3
+ "version": "1.6.40",
4
4
  "description": "JavaScript utility library",
5
5
  "license": "ISC",
6
6
  "type": "module",