@arcgis/toolkit 4.34.0-next.99 → 5.0.0-next.0
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.
- package/LICENSE.md +1 -1
- package/README.md +2 -14
- package/dist/number/index.cjs +10 -0
- package/dist/number/index.d.cts +19 -0
- package/dist/number/index.d.ts +19 -0
- package/dist/number/index.js +10 -0
- package/package.json +6 -1
package/LICENSE.md
CHANGED
package/README.md
CHANGED
|
@@ -8,18 +8,6 @@ It is not intended to be used directly, but rather used as a dependency by other
|
|
|
8
8
|
|
|
9
9
|
## License
|
|
10
10
|
|
|
11
|
-
COPYRIGHT ©
|
|
11
|
+
COPYRIGHT © Esri
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
This material is licensed for use under the [Esri Master License Agreement (MLA)](https://www.esri.com/content/dam/esrisites/en-us/media/legal/ma-full/ma-full.pdf), and is bound by the terms of that agreement.
|
|
16
|
-
You may redistribute and use this code without modification, provided you adhere to the terms of the MLA and include this copyright notice.
|
|
17
|
-
|
|
18
|
-
For additional information, contact:
|
|
19
|
-
Environmental Systems Research Institute, Inc.
|
|
20
|
-
Attn: Contracts and Legal Services Department
|
|
21
|
-
380 New York Street
|
|
22
|
-
Redlands, California, USA 92373
|
|
23
|
-
USA
|
|
24
|
-
|
|
25
|
-
email: legal@esri.com
|
|
13
|
+
This package is licensed under the terms described in the `LICENSE.md` file, located in the root of the package.
|
|
@@ -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;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/toolkit",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0-next.0",
|
|
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",
|