@pawells/math-extended 1.1.1 → 2.0.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/build/angles.d.ts +28 -18
- package/build/angles.d.ts.map +1 -1
- package/build/angles.js +28 -18
- package/build/angles.js.map +1 -1
- package/build/clamp.d.ts +5 -3
- package/build/clamp.d.ts.map +1 -1
- package/build/clamp.js +5 -3
- package/build/clamp.js.map +1 -1
- package/build/interpolation.d.ts +158 -96
- package/build/interpolation.d.ts.map +1 -1
- package/build/interpolation.js +158 -96
- package/build/interpolation.js.map +1 -1
- package/build/matrices/_exports.d.ts +13 -0
- package/build/matrices/_exports.d.ts.map +1 -0
- package/build/matrices/_exports.js +13 -0
- package/build/matrices/_exports.js.map +1 -0
- package/build/matrices/arithmetic.d.ts +170 -181
- package/build/matrices/arithmetic.d.ts.map +1 -1
- package/build/matrices/arithmetic.js +192 -202
- package/build/matrices/arithmetic.js.map +1 -1
- package/build/matrices/asserts.d.ts +240 -109
- package/build/matrices/asserts.d.ts.map +1 -1
- package/build/matrices/asserts.js +287 -87
- package/build/matrices/asserts.js.map +1 -1
- package/build/matrices/core.d.ts +29 -29
- package/build/matrices/core.js +1 -1
- package/build/matrices/decompositions.d.ts +102 -104
- package/build/matrices/decompositions.d.ts.map +1 -1
- package/build/matrices/decompositions.js +87 -89
- package/build/matrices/decompositions.js.map +1 -1
- package/build/matrices/index.d.ts +3 -2
- package/build/matrices/index.d.ts.map +1 -1
- package/build/matrices/index.js +5 -2
- package/build/matrices/index.js.map +1 -1
- package/build/matrices/linear-algebra.d.ts +12 -12
- package/build/matrices/linear-algebra.js +4 -4
- package/build/matrices/normalization.d.ts +8 -8
- package/build/matrices/transformations.d.ts +184 -165
- package/build/matrices/transformations.d.ts.map +1 -1
- package/build/matrices/transformations.js +99 -80
- package/build/matrices/transformations.js.map +1 -1
- package/build/matrices/types.d.ts +12 -12
- package/build/matrices/types.d.ts.map +1 -1
- package/build/quaternions/_exports.d.ts +11 -0
- package/build/quaternions/_exports.d.ts.map +1 -0
- package/build/quaternions/_exports.js +11 -0
- package/build/quaternions/_exports.js.map +1 -0
- package/build/quaternions/asserts.d.ts +115 -7
- package/build/quaternions/asserts.d.ts.map +1 -1
- package/build/quaternions/asserts.js +162 -8
- package/build/quaternions/asserts.js.map +1 -1
- package/build/quaternions/conversions.d.ts +31 -21
- package/build/quaternions/conversions.d.ts.map +1 -1
- package/build/quaternions/conversions.js +28 -18
- package/build/quaternions/conversions.js.map +1 -1
- package/build/quaternions/core.d.ts +67 -39
- package/build/quaternions/core.d.ts.map +1 -1
- package/build/quaternions/core.js +67 -39
- package/build/quaternions/core.js.map +1 -1
- package/build/quaternions/index.d.ts +3 -2
- package/build/quaternions/index.d.ts.map +1 -1
- package/build/quaternions/index.js +5 -2
- package/build/quaternions/index.js.map +1 -1
- package/build/quaternions/interpolation.d.ts +15 -9
- package/build/quaternions/interpolation.d.ts.map +1 -1
- package/build/quaternions/interpolation.js +15 -9
- package/build/quaternions/interpolation.js.map +1 -1
- package/build/quaternions/predefined.d.ts +9 -3
- package/build/quaternions/predefined.d.ts.map +1 -1
- package/build/quaternions/predefined.js +9 -3
- package/build/quaternions/predefined.js.map +1 -1
- package/build/quaternions/types.d.ts +3 -3
- package/build/vectors/_exports.d.ts +10 -0
- package/build/vectors/_exports.d.ts.map +1 -0
- package/build/vectors/_exports.js +10 -0
- package/build/vectors/_exports.js.map +1 -0
- package/build/vectors/asserts.d.ts +153 -49
- package/build/vectors/asserts.d.ts.map +1 -1
- package/build/vectors/asserts.js +202 -52
- package/build/vectors/asserts.js.map +1 -1
- package/build/vectors/core.d.ts +216 -137
- package/build/vectors/core.d.ts.map +1 -1
- package/build/vectors/core.js +212 -149
- package/build/vectors/core.js.map +1 -1
- package/build/vectors/index.d.ts +1 -0
- package/build/vectors/index.d.ts.map +1 -1
- package/build/vectors/index.js +3 -0
- package/build/vectors/index.js.map +1 -1
- package/build/vectors/interpolation.d.ts +39 -27
- package/build/vectors/interpolation.d.ts.map +1 -1
- package/build/vectors/interpolation.js +39 -27
- package/build/vectors/interpolation.js.map +1 -1
- package/build/vectors/predefined.d.ts +48 -24
- package/build/vectors/predefined.d.ts.map +1 -1
- package/build/vectors/predefined.js +38 -18
- package/build/vectors/predefined.js.map +1 -1
- package/package.json +3 -3
package/build/interpolation.d.ts
CHANGED
|
@@ -9,10 +9,12 @@
|
|
|
9
9
|
* @returns `a + (b - a) * t`
|
|
10
10
|
*
|
|
11
11
|
* @example
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
* ```typescript
|
|
13
|
+
* LinearInterpolation(0, 100, 0.5) // 50
|
|
14
|
+
* LinearInterpolation(0, 100, 0) // 0
|
|
15
|
+
* LinearInterpolation(0, 100, 1) // 100
|
|
16
|
+
* LinearInterpolation(0, 100, 1.5) // 150 (extrapolation)
|
|
17
|
+
* ```
|
|
16
18
|
*/
|
|
17
19
|
export declare function LinearInterpolation(a: number, b: number, t: number): number;
|
|
18
20
|
/**
|
|
@@ -25,9 +27,11 @@ export declare function LinearInterpolation(a: number, b: number, t: number): nu
|
|
|
25
27
|
* @returns Interpolated value using cubic smooth-step curve
|
|
26
28
|
*
|
|
27
29
|
* @example
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
* ```typescript
|
|
31
|
+
* SmoothStep(0, 10, 0) // 0
|
|
32
|
+
* SmoothStep(0, 10, 1) // 10
|
|
33
|
+
* SmoothStep(0, 10, 0.25) // 1.5625 (slower start than LinearInterpolation's 2.5)
|
|
34
|
+
* ```
|
|
31
35
|
*/
|
|
32
36
|
export declare function SmoothStep(a: number, b: number, t: number): number;
|
|
33
37
|
/**
|
|
@@ -41,9 +45,11 @@ export declare function SmoothStep(a: number, b: number, t: number): number;
|
|
|
41
45
|
* @returns Interpolated value using quintic smoother-step curve
|
|
42
46
|
*
|
|
43
47
|
* @example
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
48
|
+
* ```typescript
|
|
49
|
+
* SmootherStep(0, 10, 0) // 0
|
|
50
|
+
* SmootherStep(0, 10, 1) // 10
|
|
51
|
+
* SmootherStep(0, 10, 0.25) // ~1.04 (smoother start than SmoothStep)
|
|
52
|
+
* ```
|
|
47
53
|
*/
|
|
48
54
|
export declare function SmootherStep(a: number, b: number, t: number): number;
|
|
49
55
|
/**
|
|
@@ -56,9 +62,11 @@ export declare function SmootherStep(a: number, b: number, t: number): number;
|
|
|
56
62
|
* @returns Interpolated value with quadratic acceleration from start
|
|
57
63
|
*
|
|
58
64
|
* @example
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
65
|
+
* ```typescript
|
|
66
|
+
* QuadraticEaseIn(0, 10, 0) // 0
|
|
67
|
+
* QuadraticEaseIn(0, 10, 1) // 10
|
|
68
|
+
* QuadraticEaseIn(0, 10, 0.5) // 2.5 (only 25% progress at the midpoint)
|
|
69
|
+
* ```
|
|
62
70
|
*/
|
|
63
71
|
export declare function QuadraticEaseIn(a: number, b: number, t: number): number;
|
|
64
72
|
/**
|
|
@@ -71,9 +79,11 @@ export declare function QuadraticEaseIn(a: number, b: number, t: number): number
|
|
|
71
79
|
* @returns Interpolated value with quadratic deceleration toward end
|
|
72
80
|
*
|
|
73
81
|
* @example
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
82
|
+
* ```typescript
|
|
83
|
+
* QuadraticEaseOut(0, 10, 0) // 0
|
|
84
|
+
* QuadraticEaseOut(0, 10, 1) // 10
|
|
85
|
+
* QuadraticEaseOut(0, 10, 0.5) // 7.5 (already 75% progress at the midpoint)
|
|
86
|
+
* ```
|
|
77
87
|
*/
|
|
78
88
|
export declare function QuadraticEaseOut(a: number, b: number, t: number): number;
|
|
79
89
|
/**
|
|
@@ -86,9 +96,11 @@ export declare function QuadraticEaseOut(a: number, b: number, t: number): numbe
|
|
|
86
96
|
* @returns Interpolated value with cubic acceleration from start
|
|
87
97
|
*
|
|
88
98
|
* @example
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
99
|
+
* ```typescript
|
|
100
|
+
* CubicEaseIn(0, 10, 0) // 0
|
|
101
|
+
* CubicEaseIn(0, 10, 1) // 10
|
|
102
|
+
* CubicEaseIn(0, 10, 0.5) // 1.25 (only 12.5% progress at the midpoint)
|
|
103
|
+
* ```
|
|
92
104
|
*/
|
|
93
105
|
export declare function CubicEaseIn(a: number, b: number, t: number): number;
|
|
94
106
|
/**
|
|
@@ -101,9 +113,11 @@ export declare function CubicEaseIn(a: number, b: number, t: number): number;
|
|
|
101
113
|
* @returns Interpolated value with cubic deceleration toward end
|
|
102
114
|
*
|
|
103
115
|
* @example
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
116
|
+
* ```typescript
|
|
117
|
+
* CubicEaseOut(0, 10, 0) // 0
|
|
118
|
+
* CubicEaseOut(0, 10, 1) // 10
|
|
119
|
+
* CubicEaseOut(0, 10, 0.5) // 8.75 (already 87.5% progress at the midpoint)
|
|
120
|
+
* ```
|
|
107
121
|
*/
|
|
108
122
|
export declare function CubicEaseOut(a: number, b: number, t: number): number;
|
|
109
123
|
/**
|
|
@@ -116,9 +130,11 @@ export declare function CubicEaseOut(a: number, b: number, t: number): number;
|
|
|
116
130
|
* @returns Interpolated value using cosine-based easing curve
|
|
117
131
|
*
|
|
118
132
|
* @example
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
133
|
+
* ```typescript
|
|
134
|
+
* CosineInterpolation(0, 10, 0) // 0
|
|
135
|
+
* CosineInterpolation(0, 10, 1) // 10
|
|
136
|
+
* CosineInterpolation(0, 10, 0.5) // 5 (same as LERP at midpoint; smooth near endpoints)
|
|
137
|
+
* ```
|
|
122
138
|
*/
|
|
123
139
|
export declare function CosineInterpolation(a: number, b: number, t: number): number;
|
|
124
140
|
/**
|
|
@@ -131,9 +147,11 @@ export declare function CosineInterpolation(a: number, b: number, t: number): nu
|
|
|
131
147
|
* @returns Interpolated value with sine-based acceleration from start
|
|
132
148
|
*
|
|
133
149
|
* @example
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
150
|
+
* ```typescript
|
|
151
|
+
* SineEaseIn(0, 10, 0) // 0
|
|
152
|
+
* SineEaseIn(0, 10, 1) // 10
|
|
153
|
+
* SineEaseIn(0, 10, 0.5) // ~2.93 (slower than LinearInterpolation's 5 at midpoint)
|
|
154
|
+
* ```
|
|
137
155
|
*/
|
|
138
156
|
export declare function SineEaseIn(a: number, b: number, t: number): number;
|
|
139
157
|
/**
|
|
@@ -146,9 +164,11 @@ export declare function SineEaseIn(a: number, b: number, t: number): number;
|
|
|
146
164
|
* @returns Interpolated value with sine-based deceleration toward end
|
|
147
165
|
*
|
|
148
166
|
* @example
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
167
|
+
* ```typescript
|
|
168
|
+
* SineEaseOut(0, 10, 0) // 0
|
|
169
|
+
* SineEaseOut(0, 10, 1) // 10
|
|
170
|
+
* SineEaseOut(0, 10, 0.5) // ~7.07 (faster than LinearInterpolation's 5 at midpoint)
|
|
171
|
+
* ```
|
|
152
172
|
*/
|
|
153
173
|
export declare function SineEaseOut(a: number, b: number, t: number): number;
|
|
154
174
|
/**
|
|
@@ -161,9 +181,11 @@ export declare function SineEaseOut(a: number, b: number, t: number): number;
|
|
|
161
181
|
* @returns Interpolated value with exponential acceleration from start
|
|
162
182
|
*
|
|
163
183
|
* @example
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
184
|
+
* ```typescript
|
|
185
|
+
* ExponentialEaseIn(0, 10, 0) // 0
|
|
186
|
+
* ExponentialEaseIn(0, 10, 1) // 10
|
|
187
|
+
* ExponentialEaseIn(0, 10, 0.5) // ~0.31 (barely moved at midpoint)
|
|
188
|
+
* ```
|
|
167
189
|
*/
|
|
168
190
|
export declare function ExponentialEaseIn(a: number, b: number, t: number): number;
|
|
169
191
|
/**
|
|
@@ -176,9 +198,11 @@ export declare function ExponentialEaseIn(a: number, b: number, t: number): numb
|
|
|
176
198
|
* @returns Interpolated value with exponential deceleration toward end
|
|
177
199
|
*
|
|
178
200
|
* @example
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
201
|
+
* ```typescript
|
|
202
|
+
* ExponentialEaseOut(0, 10, 0) // 0
|
|
203
|
+
* ExponentialEaseOut(0, 10, 1) // 10
|
|
204
|
+
* ExponentialEaseOut(0, 10, 0.5) // ~9.69 (nearly done at midpoint)
|
|
205
|
+
* ```
|
|
182
206
|
*/
|
|
183
207
|
export declare function ExponentialEaseOut(a: number, b: number, t: number): number;
|
|
184
208
|
/**
|
|
@@ -191,9 +215,11 @@ export declare function ExponentialEaseOut(a: number, b: number, t: number): num
|
|
|
191
215
|
* @returns Interpolated value with elastic overshoot effect toward end
|
|
192
216
|
*
|
|
193
217
|
* @example
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
218
|
+
* ```typescript
|
|
219
|
+
* ElasticEaseOut(0, 10, 0) // 0
|
|
220
|
+
* ElasticEaseOut(0, 10, 1) // 10
|
|
221
|
+
* ElasticEaseOut(0, 10, 0.8) // ~10.86 (overshoots target before settling)
|
|
222
|
+
* ```
|
|
197
223
|
*/
|
|
198
224
|
export declare function ElasticEaseOut(a: number, b: number, t: number): number;
|
|
199
225
|
/**
|
|
@@ -206,9 +232,11 @@ export declare function ElasticEaseOut(a: number, b: number, t: number): number;
|
|
|
206
232
|
* @returns Interpolated value with back overshoot effect toward end
|
|
207
233
|
*
|
|
208
234
|
* @example
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
235
|
+
* ```typescript
|
|
236
|
+
* BackEaseOut(0, 10, 0) // 0
|
|
237
|
+
* BackEaseOut(0, 10, 1) // 10
|
|
238
|
+
* BackEaseOut(0, 10, 0.75) // ~10.88 (overshoots before settling)
|
|
239
|
+
* ```
|
|
212
240
|
*/
|
|
213
241
|
export declare function BackEaseOut(a: number, b: number, t: number): number;
|
|
214
242
|
/**
|
|
@@ -221,9 +249,11 @@ export declare function BackEaseOut(a: number, b: number, t: number): number;
|
|
|
221
249
|
* @returns Interpolated value with bouncing effect toward end
|
|
222
250
|
*
|
|
223
251
|
* @example
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
252
|
+
* ```typescript
|
|
253
|
+
* BounceEaseOut(0, 10, 0) // 0
|
|
254
|
+
* BounceEaseOut(0, 10, 1) // 10
|
|
255
|
+
* BounceEaseOut(0, 10, 0.5) // ~7.65 (mid-bounce)
|
|
256
|
+
* ```
|
|
227
257
|
*/
|
|
228
258
|
export declare function BounceEaseOut(a: number, b: number, t: number): number;
|
|
229
259
|
/**
|
|
@@ -238,9 +268,11 @@ export declare function BounceEaseOut(a: number, b: number, t: number): number;
|
|
|
238
268
|
* @returns Smoothly interpolated value along the Catmull-Rom spline
|
|
239
269
|
*
|
|
240
270
|
* @example
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
271
|
+
* ```typescript
|
|
272
|
+
* CatmullRomInterpolation(0, 5, 10, 15, 0) // 5 (at p1)
|
|
273
|
+
* CatmullRomInterpolation(0, 5, 10, 15, 1) // 10 (at p2)
|
|
274
|
+
* CatmullRomInterpolation(0, 5, 10, 15, 0.5) // 7.5
|
|
275
|
+
* ```
|
|
244
276
|
*/
|
|
245
277
|
export declare function CatmullRomInterpolation(p0: number, p1: number, p2: number, p3: number, t: number): number;
|
|
246
278
|
/**
|
|
@@ -255,9 +287,11 @@ export declare function CatmullRomInterpolation(p0: number, p1: number, p2: numb
|
|
|
255
287
|
* @returns Interpolated value along the Hermite spline
|
|
256
288
|
*
|
|
257
289
|
* @example
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
290
|
+
* ```typescript
|
|
291
|
+
* HermiteInterpolation(0, 10, 0, 0, 0) // 0 (at start)
|
|
292
|
+
* HermiteInterpolation(0, 10, 0, 0, 1) // 10 (at end)
|
|
293
|
+
* HermiteInterpolation(0, 10, 0, 0, 0.5) // 5 (flat tangents → same as LERP at midpoint)
|
|
294
|
+
* ```
|
|
261
295
|
*/
|
|
262
296
|
export declare function HermiteInterpolation(p0: number, p1: number, t0: number, t1: number, t: number): number;
|
|
263
297
|
/**
|
|
@@ -270,9 +304,11 @@ export declare function HermiteInterpolation(p0: number, p1: number, t0: number,
|
|
|
270
304
|
* @returns Interpolated value with circular acceleration from start
|
|
271
305
|
*
|
|
272
306
|
* @example
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
307
|
+
* ```typescript
|
|
308
|
+
* CircularEaseIn(0, 10, 0) // 0
|
|
309
|
+
* CircularEaseIn(0, 10, 1) // 10
|
|
310
|
+
* CircularEaseIn(0, 10, 0.5) // ~1.34 (very slow start along circular arc)
|
|
311
|
+
* ```
|
|
276
312
|
*/
|
|
277
313
|
export declare function CircularEaseIn(a: number, b: number, t: number): number;
|
|
278
314
|
/**
|
|
@@ -285,9 +321,11 @@ export declare function CircularEaseIn(a: number, b: number, t: number): number;
|
|
|
285
321
|
* @returns Interpolated value with circular deceleration toward end
|
|
286
322
|
*
|
|
287
323
|
* @example
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
324
|
+
* ```typescript
|
|
325
|
+
* CircularEaseOut(0, 10, 0) // 0
|
|
326
|
+
* CircularEaseOut(0, 10, 1) // 10
|
|
327
|
+
* CircularEaseOut(0, 10, 0.5) // ~8.66 (very fast start along circular arc)
|
|
328
|
+
* ```
|
|
291
329
|
*/
|
|
292
330
|
export declare function CircularEaseOut(a: number, b: number, t: number): number;
|
|
293
331
|
/**
|
|
@@ -300,10 +338,12 @@ export declare function CircularEaseOut(a: number, b: number, t: number): number
|
|
|
300
338
|
* @returns Interpolated value with quadratic symmetric easing
|
|
301
339
|
*
|
|
302
340
|
* @example
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
341
|
+
* ```typescript
|
|
342
|
+
* QuadraticEaseInOut(0, 10, 0) // 0
|
|
343
|
+
* QuadraticEaseInOut(0, 10, 1) // 10
|
|
344
|
+
* QuadraticEaseInOut(0, 10, 0.25) // 1.25 (slow start)
|
|
345
|
+
* QuadraticEaseInOut(0, 10, 0.75) // 8.75 (slow end)
|
|
346
|
+
* ```
|
|
307
347
|
*/
|
|
308
348
|
export declare function QuadraticEaseInOut(a: number, b: number, t: number): number;
|
|
309
349
|
/**
|
|
@@ -316,10 +356,12 @@ export declare function QuadraticEaseInOut(a: number, b: number, t: number): num
|
|
|
316
356
|
* @returns Interpolated value with cubic symmetric easing
|
|
317
357
|
*
|
|
318
358
|
* @example
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
359
|
+
* ```typescript
|
|
360
|
+
* CubicEaseInOut(0, 10, 0) // 0
|
|
361
|
+
* CubicEaseInOut(0, 10, 1) // 10
|
|
362
|
+
* CubicEaseInOut(0, 10, 0.25) // 0.625 (very slow start)
|
|
363
|
+
* CubicEaseInOut(0, 10, 0.75) // 9.375 (very slow end)
|
|
364
|
+
* ```
|
|
323
365
|
*/
|
|
324
366
|
export declare function CubicEaseInOut(a: number, b: number, t: number): number;
|
|
325
367
|
/**
|
|
@@ -332,9 +374,11 @@ export declare function CubicEaseInOut(a: number, b: number, t: number): number;
|
|
|
332
374
|
* @returns Interpolated value with sine-based symmetric easing
|
|
333
375
|
*
|
|
334
376
|
* @example
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
377
|
+
* ```typescript
|
|
378
|
+
* SineEaseInOut(0, 10, 0) // 0
|
|
379
|
+
* SineEaseInOut(0, 10, 1) // 10
|
|
380
|
+
* SineEaseInOut(0, 10, 0.5) // 5 (symmetric midpoint)
|
|
381
|
+
* ```
|
|
338
382
|
*/
|
|
339
383
|
export declare function SineEaseInOut(a: number, b: number, t: number): number;
|
|
340
384
|
/**
|
|
@@ -347,9 +391,11 @@ export declare function SineEaseInOut(a: number, b: number, t: number): number;
|
|
|
347
391
|
* @returns Interpolated value with exponential symmetric easing
|
|
348
392
|
*
|
|
349
393
|
* @example
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
394
|
+
* ```typescript
|
|
395
|
+
* ExponentialEaseInOut(0, 10, 0) // 0
|
|
396
|
+
* ExponentialEaseInOut(0, 10, 1) // 10
|
|
397
|
+
* ExponentialEaseInOut(0, 10, 0.25) // ~0.16 (barely moving in the first quarter)
|
|
398
|
+
* ```
|
|
353
399
|
*/
|
|
354
400
|
export declare function ExponentialEaseInOut(a: number, b: number, t: number): number;
|
|
355
401
|
/**
|
|
@@ -362,9 +408,11 @@ export declare function ExponentialEaseInOut(a: number, b: number, t: number): n
|
|
|
362
408
|
* @returns Interpolated value with circular symmetric easing
|
|
363
409
|
*
|
|
364
410
|
* @example
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
411
|
+
* ```typescript
|
|
412
|
+
* CircularEaseInOut(0, 10, 0) // 0
|
|
413
|
+
* CircularEaseInOut(0, 10, 1) // 10
|
|
414
|
+
* CircularEaseInOut(0, 10, 0.25) // ~0.67 (very slow circular start)
|
|
415
|
+
* ```
|
|
368
416
|
*/
|
|
369
417
|
export declare function CircularEaseInOut(a: number, b: number, t: number): number;
|
|
370
418
|
/**
|
|
@@ -377,9 +425,11 @@ export declare function CircularEaseInOut(a: number, b: number, t: number): numb
|
|
|
377
425
|
* @returns Interpolated value with elastic spring acceleration from start
|
|
378
426
|
*
|
|
379
427
|
* @example
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
428
|
+
* ```typescript
|
|
429
|
+
* ElasticEaseIn(0, 10, 0) // 0
|
|
430
|
+
* ElasticEaseIn(0, 10, 1) // 10
|
|
431
|
+
* ElasticEaseIn(0, 10, 0.5) // ~-0.16 (backward oscillation at midpoint before launching)
|
|
432
|
+
* ```
|
|
383
433
|
*/
|
|
384
434
|
export declare function ElasticEaseIn(a: number, b: number, t: number): number;
|
|
385
435
|
/**
|
|
@@ -392,9 +442,11 @@ export declare function ElasticEaseIn(a: number, b: number, t: number): number;
|
|
|
392
442
|
* @returns Interpolated value with elastic oscillation at both ends
|
|
393
443
|
*
|
|
394
444
|
* @example
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
445
|
+
* ```typescript
|
|
446
|
+
* ElasticEaseInOut(0, 10, 0) // 0
|
|
447
|
+
* ElasticEaseInOut(0, 10, 1) // 10
|
|
448
|
+
* ElasticEaseInOut(0, 10, 0.4) // ~-1.17 (backward oscillation before midpoint)
|
|
449
|
+
* ```
|
|
398
450
|
*/
|
|
399
451
|
export declare function ElasticEaseInOut(a: number, b: number, t: number): number;
|
|
400
452
|
/**
|
|
@@ -407,9 +459,11 @@ export declare function ElasticEaseInOut(a: number, b: number, t: number): numbe
|
|
|
407
459
|
* @returns Interpolated value with back overshoot at start
|
|
408
460
|
*
|
|
409
461
|
* @example
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
462
|
+
* ```typescript
|
|
463
|
+
* BackEaseIn(0, 10, 0) // 0
|
|
464
|
+
* BackEaseIn(0, 10, 1) // 10
|
|
465
|
+
* BackEaseIn(0, 10, 0.25) // ~-0.64 (dips below start before accelerating forward)
|
|
466
|
+
* ```
|
|
413
467
|
*/
|
|
414
468
|
export declare function BackEaseIn(a: number, b: number, t: number): number;
|
|
415
469
|
/**
|
|
@@ -422,9 +476,11 @@ export declare function BackEaseIn(a: number, b: number, t: number): number;
|
|
|
422
476
|
* @returns Interpolated value with back overshoot at both start and end
|
|
423
477
|
*
|
|
424
478
|
* @example
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
479
|
+
* ```typescript
|
|
480
|
+
* BackEaseInOut(0, 10, 0) // 0
|
|
481
|
+
* BackEaseInOut(0, 10, 1) // 10
|
|
482
|
+
* BackEaseInOut(0, 10, 0.25) // ~-1.00 (dips backward at start)
|
|
483
|
+
* ```
|
|
428
484
|
*/
|
|
429
485
|
export declare function BackEaseInOut(a: number, b: number, t: number): number;
|
|
430
486
|
/**
|
|
@@ -437,9 +493,11 @@ export declare function BackEaseInOut(a: number, b: number, t: number): number;
|
|
|
437
493
|
* @returns Interpolated value with bounce effect at start
|
|
438
494
|
*
|
|
439
495
|
* @example
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
496
|
+
* ```typescript
|
|
497
|
+
* BounceEaseIn(0, 10, 0) // 0
|
|
498
|
+
* BounceEaseIn(0, 10, 1) // 10
|
|
499
|
+
* BounceEaseIn(0, 10, 0.5) // ~2.34 (still bouncing at midpoint)
|
|
500
|
+
* ```
|
|
443
501
|
*/
|
|
444
502
|
export declare function BounceEaseIn(a: number, b: number, t: number): number;
|
|
445
503
|
/**
|
|
@@ -452,9 +510,11 @@ export declare function BounceEaseIn(a: number, b: number, t: number): number;
|
|
|
452
510
|
* @returns Interpolated value with bounce effect at both start and end
|
|
453
511
|
*
|
|
454
512
|
* @example
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
513
|
+
* ```typescript
|
|
514
|
+
* BounceEaseInOut(0, 10, 0) // 0
|
|
515
|
+
* BounceEaseInOut(0, 10, 1) // 10
|
|
516
|
+
* BounceEaseInOut(0, 10, 0.25) // ~1.17 (bouncing at start quarter)
|
|
517
|
+
* ```
|
|
458
518
|
*/
|
|
459
519
|
export declare function BounceEaseInOut(a: number, b: number, t: number): number;
|
|
460
520
|
/**
|
|
@@ -469,9 +529,11 @@ export declare function BounceEaseInOut(a: number, b: number, t: number): number
|
|
|
469
529
|
* @returns Either `a` or `b` depending on `t` relative to `threshold`
|
|
470
530
|
*
|
|
471
531
|
* @example
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
532
|
+
* ```typescript
|
|
533
|
+
* StepInterpolation(0, 10, 0.3) // 0 (below default threshold of 0.5)
|
|
534
|
+
* StepInterpolation(0, 10, 0.7) // 10 (at or above default threshold of 0.5)
|
|
535
|
+
* StepInterpolation(0, 10, 0.3, 0.25) // 10 (above custom threshold of 0.25)
|
|
536
|
+
* ```
|
|
475
537
|
*/
|
|
476
538
|
export declare function StepInterpolation(a: number, b: number, t: number, threshold?: number): number;
|
|
477
539
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interpolation.d.ts","sourceRoot":"","sources":["../src/interpolation.ts"],"names":[],"mappings":"AAiCA
|
|
1
|
+
{"version":3,"file":"interpolation.d.ts","sourceRoot":"","sources":["../src/interpolation.ts"],"names":[],"mappings":"AAiCA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAG3E;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAKlE;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAKpE;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAGvE;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAGxE;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAGnE;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAGpE;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,M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