@pawells/math-extended 1.1.1 → 3.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/README.md +15 -21
- 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 +2 -0
- package/build/clamp.d.ts.map +1 -1
- package/build/clamp.js +2 -0
- package/build/clamp.js.map +1 -1
- package/build/core.d.ts +23 -0
- package/build/core.d.ts.map +1 -0
- package/build/core.js +25 -0
- package/build/core.js.map +1 -0
- package/build/index.d.ts +1 -4
- package/build/index.d.ts.map +1 -1
- package/build/index.js +1 -6
- package/build/index.js.map +1 -1
- package/build/interpolation.d.ts +62 -13
- package/build/interpolation.d.ts.map +1 -1
- package/build/interpolation.js +66 -23
- package/build/interpolation.js.map +1 -1
- package/build/matrices/arithmetic.d.ts +65 -76
- package/build/matrices/arithmetic.d.ts.map +1 -1
- package/build/matrices/arithmetic.js +65 -107
- package/build/matrices/arithmetic.js.map +1 -1
- package/build/matrices/asserts.d.ts +26 -273
- package/build/matrices/asserts.d.ts.map +1 -1
- package/build/matrices/asserts.js +106 -350
- package/build/matrices/asserts.js.map +1 -1
- package/build/matrices/core.d.ts +150 -79
- package/build/matrices/core.d.ts.map +1 -1
- package/build/matrices/core.js +128 -104
- package/build/matrices/core.js.map +1 -1
- package/build/matrices/decompositions.d.ts +41 -44
- package/build/matrices/decompositions.d.ts.map +1 -1
- package/build/matrices/decompositions.js +51 -94
- package/build/matrices/decompositions.js.map +1 -1
- package/build/matrices/index.d.ts +2 -2
- package/build/matrices/index.d.ts.map +1 -1
- package/build/matrices/index.js +2 -2
- package/build/matrices/index.js.map +1 -1
- package/build/matrices/linear-algebra.d.ts +56 -19
- package/build/matrices/linear-algebra.d.ts.map +1 -1
- package/build/matrices/linear-algebra.js +80 -36
- package/build/matrices/linear-algebra.js.map +1 -1
- package/build/matrices/normalization.d.ts +36 -15
- package/build/matrices/normalization.d.ts.map +1 -1
- package/build/matrices/normalization.js +32 -23
- package/build/matrices/normalization.js.map +1 -1
- package/build/matrices/transformations.d.ts +39 -52
- package/build/matrices/transformations.d.ts.map +1 -1
- package/build/matrices/transformations.js +8 -11
- package/build/matrices/transformations.js.map +1 -1
- package/build/matrices/types.d.ts +39 -67
- package/build/matrices/types.d.ts.map +1 -1
- package/build/matrices/types.js +63 -1
- package/build/matrices/types.js.map +1 -1
- package/build/quaternions/asserts.d.ts +114 -15
- package/build/quaternions/asserts.d.ts.map +1 -1
- package/build/quaternions/asserts.js +189 -51
- package/build/quaternions/asserts.js.map +1 -1
- package/build/quaternions/conversions.d.ts +18 -8
- package/build/quaternions/conversions.d.ts.map +1 -1
- package/build/quaternions/conversions.js +14 -4
- package/build/quaternions/conversions.js.map +1 -1
- package/build/quaternions/core.d.ts +31 -2
- package/build/quaternions/core.d.ts.map +1 -1
- package/build/quaternions/core.js +32 -4
- package/build/quaternions/core.js.map +1 -1
- package/build/quaternions/index.d.ts +2 -2
- package/build/quaternions/index.d.ts.map +1 -1
- package/build/quaternions/index.js +3 -2
- package/build/quaternions/index.js.map +1 -1
- package/build/quaternions/interpolation.d.ts +7 -1
- package/build/quaternions/interpolation.d.ts.map +1 -1
- package/build/quaternions/interpolation.js +12 -6
- package/build/quaternions/interpolation.js.map +1 -1
- package/build/quaternions/predefined.d.ts +7 -1
- package/build/quaternions/predefined.d.ts.map +1 -1
- package/build/quaternions/predefined.js +6 -0
- package/build/quaternions/predefined.js.map +1 -1
- package/build/quaternions/types.d.ts +24 -13
- package/build/quaternions/types.d.ts.map +1 -1
- package/build/quaternions/types.js +51 -1
- package/build/quaternions/types.js.map +1 -1
- package/build/random.d.ts +66 -20
- package/build/random.d.ts.map +1 -1
- package/build/random.js +73 -20
- package/build/random.js.map +1 -1
- package/build/vectors/asserts.d.ts +33 -99
- package/build/vectors/asserts.d.ts.map +1 -1
- package/build/vectors/asserts.js +145 -181
- package/build/vectors/asserts.js.map +1 -1
- package/build/vectors/core.d.ts +76 -44
- package/build/vectors/core.d.ts.map +1 -1
- package/build/vectors/core.js +128 -119
- package/build/vectors/core.js.map +1 -1
- package/build/vectors/index.d.ts.map +1 -1
- package/build/vectors/index.js +1 -0
- package/build/vectors/index.js.map +1 -1
- package/build/vectors/interpolation.d.ts +13 -1
- package/build/vectors/interpolation.d.ts.map +1 -1
- package/build/vectors/interpolation.js +48 -47
- package/build/vectors/interpolation.js.map +1 -1
- package/build/vectors/predefined.d.ts +73 -25
- package/build/vectors/predefined.d.ts.map +1 -1
- package/build/vectors/predefined.js +62 -18
- package/build/vectors/predefined.js.map +1 -1
- package/build/vectors/types.d.ts +26 -4
- package/build/vectors/types.d.ts.map +1 -1
- package/build/vectors/types.js +50 -1
- package/build/vectors/types.js.map +1 -1
- package/package.json +4 -3
package/build/interpolation.d.ts
CHANGED
|
@@ -9,10 +9,12 @@
|
|
|
9
9
|
* @returns `a + (b - a) * t`
|
|
10
10
|
*
|
|
11
11
|
* @example
|
|
12
|
+
* ```typescript
|
|
12
13
|
* LinearInterpolation(0, 100, 0.5) // 50
|
|
13
14
|
* LinearInterpolation(0, 100, 0) // 0
|
|
14
15
|
* LinearInterpolation(0, 100, 1) // 100
|
|
15
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
|
|
30
|
+
* ```typescript
|
|
28
31
|
* SmoothStep(0, 10, 0) // 0
|
|
29
32
|
* SmoothStep(0, 10, 1) // 10
|
|
30
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
|
|
48
|
+
* ```typescript
|
|
44
49
|
* SmootherStep(0, 10, 0) // 0
|
|
45
50
|
* SmootherStep(0, 10, 1) // 10
|
|
46
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
|
|
65
|
+
* ```typescript
|
|
59
66
|
* QuadraticEaseIn(0, 10, 0) // 0
|
|
60
67
|
* QuadraticEaseIn(0, 10, 1) // 10
|
|
61
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
|
|
82
|
+
* ```typescript
|
|
74
83
|
* QuadraticEaseOut(0, 10, 0) // 0
|
|
75
84
|
* QuadraticEaseOut(0, 10, 1) // 10
|
|
76
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
|
|
99
|
+
* ```typescript
|
|
89
100
|
* CubicEaseIn(0, 10, 0) // 0
|
|
90
101
|
* CubicEaseIn(0, 10, 1) // 10
|
|
91
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
|
|
116
|
+
* ```typescript
|
|
104
117
|
* CubicEaseOut(0, 10, 0) // 0
|
|
105
118
|
* CubicEaseOut(0, 10, 1) // 10
|
|
106
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
|
|
133
|
+
* ```typescript
|
|
119
134
|
* CosineInterpolation(0, 10, 0) // 0
|
|
120
135
|
* CosineInterpolation(0, 10, 1) // 10
|
|
121
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
|
|
150
|
+
* ```typescript
|
|
134
151
|
* SineEaseIn(0, 10, 0) // 0
|
|
135
152
|
* SineEaseIn(0, 10, 1) // 10
|
|
136
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
|
|
167
|
+
* ```typescript
|
|
149
168
|
* SineEaseOut(0, 10, 0) // 0
|
|
150
169
|
* SineEaseOut(0, 10, 1) // 10
|
|
151
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
|
|
184
|
+
* ```typescript
|
|
164
185
|
* ExponentialEaseIn(0, 10, 0) // 0
|
|
165
186
|
* ExponentialEaseIn(0, 10, 1) // 10
|
|
166
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
|
|
201
|
+
* ```typescript
|
|
179
202
|
* ExponentialEaseOut(0, 10, 0) // 0
|
|
180
203
|
* ExponentialEaseOut(0, 10, 1) // 10
|
|
181
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
|
|
218
|
+
* ```typescript
|
|
194
219
|
* ElasticEaseOut(0, 10, 0) // 0
|
|
195
220
|
* ElasticEaseOut(0, 10, 1) // 10
|
|
196
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
|
|
235
|
+
* ```typescript
|
|
209
236
|
* BackEaseOut(0, 10, 0) // 0
|
|
210
237
|
* BackEaseOut(0, 10, 1) // 10
|
|
211
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
|
|
252
|
+
* ```typescript
|
|
224
253
|
* BounceEaseOut(0, 10, 0) // 0
|
|
225
254
|
* BounceEaseOut(0, 10, 1) // 10
|
|
226
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
|
|
271
|
+
* ```typescript
|
|
241
272
|
* CatmullRomInterpolation(0, 5, 10, 15, 0) // 5 (at p1)
|
|
242
273
|
* CatmullRomInterpolation(0, 5, 10, 15, 1) // 10 (at p2)
|
|
243
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
|
|
290
|
+
* ```typescript
|
|
258
291
|
* HermiteInterpolation(0, 10, 0, 0, 0) // 0 (at start)
|
|
259
292
|
* HermiteInterpolation(0, 10, 0, 0, 1) // 10 (at end)
|
|
260
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
|
|
307
|
+
* ```typescript
|
|
273
308
|
* CircularEaseIn(0, 10, 0) // 0
|
|
274
309
|
* CircularEaseIn(0, 10, 1) // 10
|
|
275
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
|
|
324
|
+
* ```typescript
|
|
288
325
|
* CircularEaseOut(0, 10, 0) // 0
|
|
289
326
|
* CircularEaseOut(0, 10, 1) // 10
|
|
290
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
|
|
341
|
+
* ```typescript
|
|
303
342
|
* QuadraticEaseInOut(0, 10, 0) // 0
|
|
304
343
|
* QuadraticEaseInOut(0, 10, 1) // 10
|
|
305
344
|
* QuadraticEaseInOut(0, 10, 0.25) // 1.25 (slow start)
|
|
306
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
|
|
359
|
+
* ```typescript
|
|
319
360
|
* CubicEaseInOut(0, 10, 0) // 0
|
|
320
361
|
* CubicEaseInOut(0, 10, 1) // 10
|
|
321
362
|
* CubicEaseInOut(0, 10, 0.25) // 0.625 (very slow start)
|
|
322
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
|
|
377
|
+
* ```typescript
|
|
335
378
|
* SineEaseInOut(0, 10, 0) // 0
|
|
336
379
|
* SineEaseInOut(0, 10, 1) // 10
|
|
337
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
|
|
394
|
+
* ```typescript
|
|
350
395
|
* ExponentialEaseInOut(0, 10, 0) // 0
|
|
351
396
|
* ExponentialEaseInOut(0, 10, 1) // 10
|
|
352
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
|
|
411
|
+
* ```typescript
|
|
365
412
|
* CircularEaseInOut(0, 10, 0) // 0
|
|
366
413
|
* CircularEaseInOut(0, 10, 1) // 10
|
|
367
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
|
|
428
|
+
* ```typescript
|
|
380
429
|
* ElasticEaseIn(0, 10, 0) // 0
|
|
381
430
|
* ElasticEaseIn(0, 10, 1) // 10
|
|
382
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
|
|
445
|
+
* ```typescript
|
|
395
446
|
* ElasticEaseInOut(0, 10, 0) // 0
|
|
396
447
|
* ElasticEaseInOut(0, 10, 1) // 10
|
|
397
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
|
|
462
|
+
* ```typescript
|
|
410
463
|
* BackEaseIn(0, 10, 0) // 0
|
|
411
464
|
* BackEaseIn(0, 10, 1) // 10
|
|
412
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
|
|
479
|
+
* ```typescript
|
|
425
480
|
* BackEaseInOut(0, 10, 0) // 0
|
|
426
481
|
* BackEaseInOut(0, 10, 1) // 10
|
|
427
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
|
|
496
|
+
* ```typescript
|
|
440
497
|
* BounceEaseIn(0, 10, 0) // 0
|
|
441
498
|
* BounceEaseIn(0, 10, 1) // 10
|
|
442
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
|
|
513
|
+
* ```typescript
|
|
455
514
|
* BounceEaseInOut(0, 10, 0) // 0
|
|
456
515
|
* BounceEaseInOut(0, 10, 1) // 10
|
|
457
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,22 +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
|
|
532
|
+
* ```typescript
|
|
472
533
|
* StepInterpolation(0, 10, 0.3) // 0 (below default threshold of 0.5)
|
|
473
534
|
* StepInterpolation(0, 10, 0.7) // 10 (at or above default threshold of 0.5)
|
|
474
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
|
-
/**
|
|
478
|
-
* Spherical linear interpolation for scalar values.
|
|
479
|
-
* For scalar inputs, this is mathematically equivalent to {@link LinearInterpolation}.
|
|
480
|
-
* For true spherical rotation interpolation, use `QuaternionSLERP` from the quaternions module.
|
|
481
|
-
*
|
|
482
|
-
* @param a - Start value (result when t = 0)
|
|
483
|
-
* @param b - End value (result when t = 1)
|
|
484
|
-
* @param t - Interpolation parameter — unclamped, allowing extrapolation
|
|
485
|
-
* @returns Linearly interpolated value (identical to `LinearInterpolation(a, b, t)`)
|
|
486
|
-
*
|
|
487
|
-
* @deprecated This function is identical to LinearInterpolation and is not a true spherical interpolation. For quaternion spherical interpolation, use QuaternionSLERP from the quaternions module.
|
|
488
|
-
*/
|
|
489
|
-
export declare function SphericalLinearInterpolation(a: number, b: number, t: number): number;
|
|
490
539
|
//# sourceMappingURL=interpolation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interpolation.d.ts","sourceRoot":"","sources":["../src/interpolation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"interpolation.d.ts","sourceRoot":"","sources":["../src/interpolation.ts"],"names":[],"mappings":"AAkCA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,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