@arcgis/toolkit 4.34.0-next.138 → 4.34.0-next.140

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.
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ function clamp(value, min, max) {
4
+ return Math.max(min, Math.min(max, value));
5
+ }
6
+ function lerp(min, max, t) {
7
+ return min + (max - min) * t;
8
+ }
9
+ exports.clamp = clamp;
10
+ exports.lerp = lerp;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Clamps a value between a minimum and maximum value.
3
+ *
4
+ * @param value The number to clamp.
5
+ * @param min The minimum value.
6
+ * @param max The maximum value.
7
+ *
8
+ * @returns The clamped value.
9
+ */
10
+ export declare function clamp(value: number, min: number, max: number): number;
11
+ /**
12
+ * Linearly interpolates between two numbers.
13
+ *
14
+ * @param min - The start value.
15
+ * @param max - The end value.
16
+ * @param t - The interpolation factor, typically between 0 and 1.
17
+ * @returns The interpolated value between `min` and `max` based on `t`.
18
+ */
19
+ export declare function lerp(min: number, max: number, t: number): number;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Clamps a value between a minimum and maximum value.
3
+ *
4
+ * @param value The number to clamp.
5
+ * @param min The minimum value.
6
+ * @param max The maximum value.
7
+ *
8
+ * @returns The clamped value.
9
+ */
10
+ export declare function clamp(value: number, min: number, max: number): number;
11
+ /**
12
+ * Linearly interpolates between two numbers.
13
+ *
14
+ * @param min - The start value.
15
+ * @param max - The end value.
16
+ * @param t - The interpolation factor, typically between 0 and 1.
17
+ * @returns The interpolated value between `min` and `max` based on `t`.
18
+ */
19
+ export declare function lerp(min: number, max: number, t: number): number;
@@ -0,0 +1,10 @@
1
+ function clamp(value, min, max) {
2
+ return Math.max(min, Math.min(max, value));
3
+ }
4
+ function lerp(min, max, t) {
5
+ return min + (max - min) * t;
6
+ }
7
+ export {
8
+ clamp,
9
+ lerp
10
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/toolkit",
3
- "version": "4.34.0-next.138",
3
+ "version": "4.34.0-next.140",
4
4
  "description": "Collection of common internal patterns and utilities for ArcGIS Maps SDK for JavaScript components.",
5
5
  "homepage": "https://developers.arcgis.com/javascript/latest/",
6
6
  "sideEffects": false,
@@ -31,6 +31,11 @@
31
31
  "import": "./dist/intl/index.js",
32
32
  "require": "./dist/intl/index.cjs"
33
33
  },
34
+ "./number": {
35
+ "types": "./dist/number/index.d.ts",
36
+ "import": "./dist/number/index.js",
37
+ "require": "./dist/number/index.cjs"
38
+ },
34
39
  "./predicate": {
35
40
  "types": "./dist/predicate/index.d.ts",
36
41
  "import": "./dist/predicate/index.js",