@pawells/math-extended 1.0.1

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.
Files changed (195) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +319 -0
  3. package/build/angles.d.ts +31 -0
  4. package/build/angles.d.ts.map +1 -0
  5. package/build/angles.js +85 -0
  6. package/build/angles.js.map +1 -0
  7. package/build/angles.spec.d.ts +2 -0
  8. package/build/angles.spec.d.ts.map +1 -0
  9. package/build/angles.spec.js +147 -0
  10. package/build/angles.spec.js.map +1 -0
  11. package/build/clamp.d.ts +17 -0
  12. package/build/clamp.d.ts.map +1 -0
  13. package/build/clamp.js +19 -0
  14. package/build/clamp.js.map +1 -0
  15. package/build/clamp.spec.d.ts +2 -0
  16. package/build/clamp.spec.d.ts.map +1 -0
  17. package/build/clamp.spec.js +19 -0
  18. package/build/clamp.spec.js.map +1 -0
  19. package/build/documentation-validation.spec.d.ts +11 -0
  20. package/build/documentation-validation.spec.d.ts.map +1 -0
  21. package/build/documentation-validation.spec.js +401 -0
  22. package/build/documentation-validation.spec.js.map +1 -0
  23. package/build/index.d.ts +8 -0
  24. package/build/index.d.ts.map +1 -0
  25. package/build/index.js +8 -0
  26. package/build/index.js.map +1 -0
  27. package/build/interpolation.d.ts +175 -0
  28. package/build/interpolation.d.ts.map +1 -0
  29. package/build/interpolation.js +369 -0
  30. package/build/interpolation.js.map +1 -0
  31. package/build/interpolation.spec.d.ts +2 -0
  32. package/build/interpolation.spec.d.ts.map +1 -0
  33. package/build/interpolation.spec.js +480 -0
  34. package/build/interpolation.spec.js.map +1 -0
  35. package/build/matrices/arithmetic.d.ts +411 -0
  36. package/build/matrices/arithmetic.d.ts.map +1 -0
  37. package/build/matrices/arithmetic.js +954 -0
  38. package/build/matrices/arithmetic.js.map +1 -0
  39. package/build/matrices/arithmetic.spec.d.ts +2 -0
  40. package/build/matrices/arithmetic.spec.d.ts.map +1 -0
  41. package/build/matrices/arithmetic.spec.js +915 -0
  42. package/build/matrices/arithmetic.spec.js.map +1 -0
  43. package/build/matrices/asserts.d.ts +306 -0
  44. package/build/matrices/asserts.d.ts.map +1 -0
  45. package/build/matrices/asserts.js +396 -0
  46. package/build/matrices/asserts.js.map +1 -0
  47. package/build/matrices/asserts.spec.d.ts +2 -0
  48. package/build/matrices/asserts.spec.d.ts.map +1 -0
  49. package/build/matrices/asserts.spec.js +565 -0
  50. package/build/matrices/asserts.spec.js.map +1 -0
  51. package/build/matrices/core.d.ts +168 -0
  52. package/build/matrices/core.d.ts.map +1 -0
  53. package/build/matrices/core.js +457 -0
  54. package/build/matrices/core.js.map +1 -0
  55. package/build/matrices/core.spec.d.ts +2 -0
  56. package/build/matrices/core.spec.d.ts.map +1 -0
  57. package/build/matrices/core.spec.js +634 -0
  58. package/build/matrices/core.spec.js.map +1 -0
  59. package/build/matrices/decompositions.d.ts +326 -0
  60. package/build/matrices/decompositions.d.ts.map +1 -0
  61. package/build/matrices/decompositions.js +816 -0
  62. package/build/matrices/decompositions.js.map +1 -0
  63. package/build/matrices/decompositions.spec.d.ts +2 -0
  64. package/build/matrices/decompositions.spec.d.ts.map +1 -0
  65. package/build/matrices/decompositions.spec.js +195 -0
  66. package/build/matrices/decompositions.spec.js.map +1 -0
  67. package/build/matrices/index.d.ts +9 -0
  68. package/build/matrices/index.d.ts.map +1 -0
  69. package/build/matrices/index.js +9 -0
  70. package/build/matrices/index.js.map +1 -0
  71. package/build/matrices/linear-algebra.d.ts +64 -0
  72. package/build/matrices/linear-algebra.d.ts.map +1 -0
  73. package/build/matrices/linear-algebra.js +253 -0
  74. package/build/matrices/linear-algebra.js.map +1 -0
  75. package/build/matrices/linear-algebra.spec.d.ts +2 -0
  76. package/build/matrices/linear-algebra.spec.d.ts.map +1 -0
  77. package/build/matrices/linear-algebra.spec.js +355 -0
  78. package/build/matrices/linear-algebra.spec.js.map +1 -0
  79. package/build/matrices/normalization.d.ts +62 -0
  80. package/build/matrices/normalization.d.ts.map +1 -0
  81. package/build/matrices/normalization.js +167 -0
  82. package/build/matrices/normalization.js.map +1 -0
  83. package/build/matrices/normalization.spec.d.ts +2 -0
  84. package/build/matrices/normalization.spec.d.ts.map +1 -0
  85. package/build/matrices/normalization.spec.js +335 -0
  86. package/build/matrices/normalization.spec.js.map +1 -0
  87. package/build/matrices/transformations.d.ts +484 -0
  88. package/build/matrices/transformations.d.ts.map +1 -0
  89. package/build/matrices/transformations.js +592 -0
  90. package/build/matrices/transformations.js.map +1 -0
  91. package/build/matrices/transformations.spec.d.ts +2 -0
  92. package/build/matrices/transformations.spec.d.ts.map +1 -0
  93. package/build/matrices/transformations.spec.js +755 -0
  94. package/build/matrices/transformations.spec.js.map +1 -0
  95. package/build/matrices/types.d.ts +134 -0
  96. package/build/matrices/types.d.ts.map +1 -0
  97. package/build/matrices/types.js +6 -0
  98. package/build/matrices/types.js.map +1 -0
  99. package/build/quaternions/asserts.d.ts +77 -0
  100. package/build/quaternions/asserts.d.ts.map +1 -0
  101. package/build/quaternions/asserts.js +175 -0
  102. package/build/quaternions/asserts.js.map +1 -0
  103. package/build/quaternions/asserts.spec.d.ts +2 -0
  104. package/build/quaternions/asserts.spec.d.ts.map +1 -0
  105. package/build/quaternions/asserts.spec.js +320 -0
  106. package/build/quaternions/asserts.spec.js.map +1 -0
  107. package/build/quaternions/conversions.d.ts +73 -0
  108. package/build/quaternions/conversions.d.ts.map +1 -0
  109. package/build/quaternions/conversions.js +179 -0
  110. package/build/quaternions/conversions.js.map +1 -0
  111. package/build/quaternions/conversions.spec.d.ts +2 -0
  112. package/build/quaternions/conversions.spec.d.ts.map +1 -0
  113. package/build/quaternions/conversions.spec.js +344 -0
  114. package/build/quaternions/conversions.spec.js.map +1 -0
  115. package/build/quaternions/core.d.ts +203 -0
  116. package/build/quaternions/core.d.ts.map +1 -0
  117. package/build/quaternions/core.js +374 -0
  118. package/build/quaternions/core.js.map +1 -0
  119. package/build/quaternions/core.spec.d.ts +2 -0
  120. package/build/quaternions/core.spec.d.ts.map +1 -0
  121. package/build/quaternions/core.spec.js +294 -0
  122. package/build/quaternions/core.spec.js.map +1 -0
  123. package/build/quaternions/index.d.ts +7 -0
  124. package/build/quaternions/index.d.ts.map +1 -0
  125. package/build/quaternions/index.js +7 -0
  126. package/build/quaternions/index.js.map +1 -0
  127. package/build/quaternions/interpolation.d.ts +54 -0
  128. package/build/quaternions/interpolation.d.ts.map +1 -0
  129. package/build/quaternions/interpolation.js +201 -0
  130. package/build/quaternions/interpolation.js.map +1 -0
  131. package/build/quaternions/interpolation.spec.d.ts +2 -0
  132. package/build/quaternions/interpolation.spec.d.ts.map +1 -0
  133. package/build/quaternions/interpolation.spec.js +64 -0
  134. package/build/quaternions/interpolation.spec.js.map +1 -0
  135. package/build/quaternions/predefined.d.ts +36 -0
  136. package/build/quaternions/predefined.d.ts.map +1 -0
  137. package/build/quaternions/predefined.js +42 -0
  138. package/build/quaternions/predefined.js.map +1 -0
  139. package/build/quaternions/predefined.spec.d.ts +2 -0
  140. package/build/quaternions/predefined.spec.d.ts.map +1 -0
  141. package/build/quaternions/predefined.spec.js +35 -0
  142. package/build/quaternions/predefined.spec.js.map +1 -0
  143. package/build/quaternions/types.d.ts +55 -0
  144. package/build/quaternions/types.d.ts.map +1 -0
  145. package/build/quaternions/types.js +7 -0
  146. package/build/quaternions/types.js.map +1 -0
  147. package/build/random.d.ts +66 -0
  148. package/build/random.d.ts.map +1 -0
  149. package/build/random.js +115 -0
  150. package/build/random.js.map +1 -0
  151. package/build/random.spec.d.ts +2 -0
  152. package/build/random.spec.d.ts.map +1 -0
  153. package/build/random.spec.js +267 -0
  154. package/build/random.spec.js.map +1 -0
  155. package/build/vectors/asserts.d.ts +182 -0
  156. package/build/vectors/asserts.d.ts.map +1 -0
  157. package/build/vectors/asserts.js +285 -0
  158. package/build/vectors/asserts.js.map +1 -0
  159. package/build/vectors/asserts.spec.d.ts +2 -0
  160. package/build/vectors/asserts.spec.d.ts.map +1 -0
  161. package/build/vectors/asserts.spec.js +260 -0
  162. package/build/vectors/asserts.spec.js.map +1 -0
  163. package/build/vectors/core.d.ts +507 -0
  164. package/build/vectors/core.d.ts.map +1 -0
  165. package/build/vectors/core.js +825 -0
  166. package/build/vectors/core.js.map +1 -0
  167. package/build/vectors/core.spec.d.ts +2 -0
  168. package/build/vectors/core.spec.d.ts.map +1 -0
  169. package/build/vectors/core.spec.js +343 -0
  170. package/build/vectors/core.spec.js.map +1 -0
  171. package/build/vectors/index.d.ts +6 -0
  172. package/build/vectors/index.d.ts.map +1 -0
  173. package/build/vectors/index.js +6 -0
  174. package/build/vectors/index.js.map +1 -0
  175. package/build/vectors/interpolation.d.ts +404 -0
  176. package/build/vectors/interpolation.d.ts.map +1 -0
  177. package/build/vectors/interpolation.js +585 -0
  178. package/build/vectors/interpolation.js.map +1 -0
  179. package/build/vectors/interpolation.spec.d.ts +2 -0
  180. package/build/vectors/interpolation.spec.d.ts.map +1 -0
  181. package/build/vectors/interpolation.spec.js +378 -0
  182. package/build/vectors/interpolation.spec.js.map +1 -0
  183. package/build/vectors/predefined.d.ts +191 -0
  184. package/build/vectors/predefined.d.ts.map +1 -0
  185. package/build/vectors/predefined.js +191 -0
  186. package/build/vectors/predefined.js.map +1 -0
  187. package/build/vectors/predefined.spec.d.ts +2 -0
  188. package/build/vectors/predefined.spec.d.ts.map +1 -0
  189. package/build/vectors/predefined.spec.js +333 -0
  190. package/build/vectors/predefined.spec.js.map +1 -0
  191. package/build/vectors/types.d.ts +62 -0
  192. package/build/vectors/types.d.ts.map +1 -0
  193. package/build/vectors/types.js +6 -0
  194. package/build/vectors/types.js.map +1 -0
  195. package/package.json +75 -0
@@ -0,0 +1,585 @@
1
+ /**
2
+ * Vector interpolation functions for smooth animation and transitions.
3
+ * Provides component-wise interpolation using various easing and interpolation algorithms.
4
+ */
5
+ import { AssertNumber } from '@pawells/typescript-common';
6
+ import { Clamp } from '../clamp.js';
7
+ import { LinearInterpolation, SmoothStep, SmootherStep, QuadraticEaseIn, QuadraticEaseOut, QuadraticEaseInOut, CubicEaseIn, CubicEaseOut, CubicEaseInOut, CosineInterpolation, SineEaseIn, SineEaseOut, SineEaseInOut, ExponentialEaseIn, ExponentialEaseOut, ExponentialEaseInOut, ElasticEaseIn, ElasticEaseOut, ElasticEaseInOut, BackEaseIn, BackEaseOut, BackEaseInOut, BounceEaseIn, BounceEaseOut, BounceEaseInOut, CatmullRomInterpolation, HermiteInterpolation, CircularEaseIn, CircularEaseOut, CircularEaseInOut, StepInterpolation } from '../interpolation.js';
8
+ import { AssertVectors, AssertVectorValue } from './asserts.js';
9
+ import { VectorNormalize, VectorDot } from './core.js';
10
+ /**
11
+ * Helper function to apply interpolation function to vectors component-wise.
12
+ * Internal utility for consistent vector interpolation across different algorithms.
13
+ *
14
+ * @template T - The vector type extending TVector
15
+ * @param a - Start vector
16
+ * @param b - End vector
17
+ * @param t - Interpolation parameter (0 = a, 1 = b)
18
+ * @param interpolationFn - The interpolation function to apply to each component
19
+ * @returns Interpolated vector with same type as input
20
+ */
21
+ function vectorInterpolate(a, b, t, interpolationFn) {
22
+ AssertVectors([a, b], { minSize: 1, finite: true });
23
+ AssertNumber(t);
24
+ const result = [];
25
+ for (let i = 0; i < a.length; i++) {
26
+ const av = a[i];
27
+ AssertVectorValue(av, {}, { index: i });
28
+ const bv = b[i];
29
+ AssertVectorValue(bv, {}, { index: i });
30
+ result.push(interpolationFn(av, bv, t));
31
+ }
32
+ return result;
33
+ }
34
+ /**
35
+ * Performs linear interpolation (LERP) between two vectors.
36
+ * The most basic and commonly used interpolation method, providing
37
+ * constant velocity transition between vectors.
38
+ *
39
+ * @template T - The vector type extending TVector
40
+ * @param a - Start vector (when t = 0)
41
+ * @param b - End vector (when t = 1)
42
+ * @param t - Interpolation parameter (0 = a, 1 = b, values outside [0,1] extrapolate)
43
+ * @returns Linearly interpolated vector
44
+ *
45
+ * @example
46
+ * const start = [0, 0, 0];
47
+ * const end = [10, 20, 30];
48
+ * const halfway = VectorLERP(start, end, 0.5); // [5, 10, 15]
49
+ * const quarter = VectorLERP(start, end, 0.25); // [2.5, 5, 7.5]
50
+ */
51
+ export function VectorLERP(a, b, t) {
52
+ AssertVectors([a, b], { minSize: 1, finite: true });
53
+ AssertNumber(t);
54
+ const result = [];
55
+ for (let i = 0; i < a.length; i++) {
56
+ const av = a[i];
57
+ AssertVectorValue(av, {}, { index: i });
58
+ const bv = b[i];
59
+ AssertVectorValue(bv, {}, { index: i });
60
+ result.push(LinearInterpolation(av, bv, t));
61
+ }
62
+ return result;
63
+ }
64
+ /**
65
+ * Performs smooth step interpolation between two vectors.
66
+ * Uses Hermite interpolation (3t² - 2t³) for smooth acceleration and deceleration.
67
+ *
68
+ * @template T - The vector type extending TVector
69
+ * @param a - Start vector
70
+ * @param b - End vector
71
+ * @param t - Interpolation parameter (clamped to [0,1])
72
+ * @returns Smoothly interpolated vector with smooth start and end
73
+ *
74
+ * @example
75
+ * const start = [0, 0];
76
+ * const end = [100, 200];
77
+ * const smooth = VectorSmoothStep(start, end, 0.5); // Smooth transition
78
+ */
79
+ export function VectorSmoothStep(a, b, t) {
80
+ AssertVectors([a, b], { minSize: 1, finite: true });
81
+ return vectorInterpolate(a, b, t, SmoothStep);
82
+ }
83
+ /**
84
+ * Performs smoother step interpolation between two vectors.
85
+ * Uses Ken Perlin's improved smoothstep (6t⁵ - 15t⁴ + 10t³) for even smoother transitions.
86
+ *
87
+ * @template T - The vector type extending TVector
88
+ * @param a - Start vector
89
+ * @param b - End vector
90
+ * @param t - Interpolation parameter (clamped to [0,1])
91
+ * @returns Very smoothly interpolated vector with smooth acceleration/deceleration
92
+ */
93
+ export function VectorSmootherStep(a, b, t) {
94
+ AssertVectors([a, b], { minSize: 1, finite: true });
95
+ return vectorInterpolate(a, b, t, SmootherStep);
96
+ }
97
+ /**
98
+ * Performs quadratic ease-in interpolation between two vectors.
99
+ * Starts slowly and accelerates toward the end (t²).
100
+ *
101
+ * @template T - The vector type extending TVector
102
+ * @param a - Start vector
103
+ * @param b - End vector
104
+ * @param t - Interpolation parameter [0,1]
105
+ * @returns Vector with quadratic acceleration from start
106
+ */
107
+ export function VectorQuadraticEaseIn(a, b, t) {
108
+ AssertVectors([a, b], { minSize: 1, finite: true });
109
+ return vectorInterpolate(a, b, t, QuadraticEaseIn);
110
+ }
111
+ /**
112
+ * Performs quadratic ease-out interpolation between two vectors.
113
+ * Starts quickly and decelerates toward the end (1 - (1-t)²).
114
+ *
115
+ * @template T - The vector type extending TVector
116
+ * @param a - Start vector
117
+ * @param b - End vector
118
+ * @param t - Interpolation parameter [0,1]
119
+ * @returns Vector with quadratic deceleration toward end
120
+ */
121
+ export function VectorQuadraticEaseOut(a, b, t) {
122
+ AssertVectors([a, b], { minSize: 1, finite: true });
123
+ return vectorInterpolate(a, b, t, QuadraticEaseOut);
124
+ }
125
+ /**
126
+ * Performs cubic ease-in interpolation between two vectors.
127
+ * Starts very slowly and accelerates toward the end (t³).
128
+ *
129
+ * @template T - The vector type extending TVector
130
+ * @param a - Start vector
131
+ * @param b - End vector
132
+ * @param t - Interpolation parameter [0,1]
133
+ * @returns Vector with cubic acceleration from start
134
+ */
135
+ export function VectorCubicEaseIn(a, b, t) {
136
+ AssertVectors([a, b], { minSize: 1, finite: true });
137
+ return vectorInterpolate(a, b, t, CubicEaseIn);
138
+ }
139
+ /**
140
+ * Performs cubic ease-out interpolation between two vectors.
141
+ * Starts quickly and decelerates toward the end (1 - (1-t)³).
142
+ *
143
+ * @template T - The vector type extending TVector
144
+ * @param a - Start vector
145
+ * @param b - End vector
146
+ * @param t - Interpolation parameter [0,1]
147
+ * @returns Vector with cubic deceleration toward end
148
+ */
149
+ export function VectorCubicEaseOut(a, b, t) {
150
+ AssertVectors([a, b], { minSize: 1, finite: true });
151
+ return vectorInterpolate(a, b, t, CubicEaseOut);
152
+ }
153
+ /**
154
+ * Performs cosine-based interpolation between two vectors.
155
+ * Uses cosine function for smooth, natural-feeling transitions.
156
+ *
157
+ * @template T - The vector type extending TVector
158
+ * @param a - Start vector
159
+ * @param b - End vector
160
+ * @param t - Interpolation parameter [0,1]
161
+ * @returns Vector interpolated using cosine curve
162
+ */
163
+ export function VectorCosineInterpolation(a, b, t) {
164
+ AssertVectors([a, b], { minSize: 1, finite: true });
165
+ return vectorInterpolate(a, b, t, CosineInterpolation);
166
+ }
167
+ /**
168
+ * Performs sine ease-in interpolation between two vectors.
169
+ * Starts slowly and accelerates using sine curve.
170
+ *
171
+ * @template T - The vector type extending TVector
172
+ * @param a - Start vector
173
+ * @param b - End vector
174
+ * @param t - Interpolation parameter [0,1]
175
+ * @returns Vector with sine-based acceleration from start
176
+ */
177
+ export function VectorSineEaseIn(a, b, t) {
178
+ AssertVectors([a, b], { minSize: 1, finite: true });
179
+ return vectorInterpolate(a, b, t, SineEaseIn);
180
+ }
181
+ /**
182
+ * Performs sine ease-out interpolation between two vectors.
183
+ * Starts quickly and decelerates using sine curve.
184
+ *
185
+ * @template T - The vector type extending TVector
186
+ * @param a - Start vector
187
+ * @param b - End vector
188
+ * @param t - Interpolation parameter [0,1]
189
+ * @returns Vector with sine-based deceleration toward end
190
+ */
191
+ export function VectorSineEaseOut(a, b, t) {
192
+ AssertVectors([a, b], { minSize: 1, finite: true });
193
+ return vectorInterpolate(a, b, t, SineEaseOut);
194
+ }
195
+ /**
196
+ * Performs exponential ease-in interpolation between two vectors.
197
+ * Starts very slowly and accelerates exponentially.
198
+ *
199
+ * @template T - The vector type extending TVector
200
+ * @param a - Start vector
201
+ * @param b - End vector
202
+ * @param t - Interpolation parameter [0,1]
203
+ * @returns Vector with exponential acceleration from start
204
+ */
205
+ export function VectorExponentialEaseIn(a, b, t) {
206
+ AssertVectors([a, b], { minSize: 1, finite: true });
207
+ return vectorInterpolate(a, b, t, ExponentialEaseIn);
208
+ }
209
+ /**
210
+ * Performs exponential ease-out interpolation between two vectors.
211
+ * Starts quickly and decelerates exponentially.
212
+ *
213
+ * @template T - The vector type extending TVector
214
+ * @param a - Start vector
215
+ * @param b - End vector
216
+ * @param t - Interpolation parameter [0,1]
217
+ * @returns Vector with exponential deceleration toward end
218
+ */
219
+ export function VectorExponentialEaseOut(a, b, t) {
220
+ AssertVectors([a, b], { minSize: 1, finite: true });
221
+ return vectorInterpolate(a, b, t, ExponentialEaseOut);
222
+ }
223
+ /**
224
+ * Performs elastic ease-out interpolation between two vectors.
225
+ * Creates a springy, elastic effect that overshoots and bounces back.
226
+ *
227
+ * @template T - The vector type extending TVector
228
+ * @param a - Start vector
229
+ * @param b - End vector
230
+ * @param t - Interpolation parameter [0,1]
231
+ * @returns Vector with elastic bounce effect toward end
232
+ */
233
+ export function VectorElasticEaseOut(a, b, t) {
234
+ AssertVectors([a, b], { minSize: 1, finite: true });
235
+ return vectorInterpolate(a, b, t, ElasticEaseOut);
236
+ }
237
+ /**
238
+ * Performs back ease-out interpolation between two vectors.
239
+ * Overshoots the target and then backs into place, like a spring.
240
+ *
241
+ * @template T - The vector type extending TVector
242
+ * @param a - Start vector
243
+ * @param b - End vector
244
+ * @param t - Interpolation parameter [0,1]
245
+ * @returns Vector with back overshoot effect toward end
246
+ */
247
+ export function VectorBackEaseOut(a, b, t) {
248
+ AssertVectors([a, b], { minSize: 1, finite: true });
249
+ return vectorInterpolate(a, b, t, BackEaseOut);
250
+ }
251
+ /**
252
+ * Performs bounce ease-out interpolation between two vectors.
253
+ * Creates a bouncing ball effect with decreasing amplitude.
254
+ *
255
+ * @template T - The vector type extending TVector
256
+ * @param a - Start vector
257
+ * @param b - End vector
258
+ * @param t - Interpolation parameter [0,1]
259
+ * @returns Vector with bouncing effect toward end
260
+ */
261
+ export function VectorBounceEaseOut(a, b, t) {
262
+ AssertVectors([a, b], { minSize: 1, finite: true });
263
+ return vectorInterpolate(a, b, t, BounceEaseOut);
264
+ }
265
+ /**
266
+ * Performs Catmull-Rom spline interpolation between vectors for smooth curves.
267
+ * Uses four control points to create smooth curves through p1 and p2.
268
+ *
269
+ * @template T - The vector type extending TVector
270
+ * @param p0 - Previous control point
271
+ * @param p1 - Start point (returned when t = 0)
272
+ * @param p2 - End point (returned when t = 1)
273
+ * @param p3 - Next control point
274
+ * @param t - Interpolation parameter [0,1]
275
+ * @returns Smoothly interpolated vector using Catmull-Rom spline
276
+ *
277
+ * @example
278
+ * const path = [
279
+ * [0, 0], // p0 - previous point
280
+ * [10, 0], // p1 - start
281
+ * [20, 10], // p2 - end
282
+ * [30, 10] // p3 - next point
283
+ * ];
284
+ * const smooth = VectorCatmullRomInterpolation(...path, 0.5);
285
+ */
286
+ export function VectorCatmullRomInterpolation(p0, p1, p2, p3, t) {
287
+ AssertVectors([p0, p1, p2, p3], { minSize: 1, finite: true });
288
+ AssertNumber(t);
289
+ const result = [];
290
+ for (let i = 0; i < p0.length; i++) {
291
+ const p0v = p0[i];
292
+ AssertVectorValue(p0v, {}, { index: i });
293
+ const p1v = p1[i];
294
+ AssertVectorValue(p1v, {}, { index: i });
295
+ const p2v = p2[i];
296
+ AssertVectorValue(p2v, {}, { index: i });
297
+ const p3v = p3[i];
298
+ AssertVectorValue(p3v, {}, { index: i });
299
+ result.push(CatmullRomInterpolation(p0v, p1v, p2v, p3v, t));
300
+ }
301
+ return result;
302
+ }
303
+ /**
304
+ * Performs Hermite interpolation between vectors with tangent control.
305
+ * Provides precise control over the curve's tangent vectors at start and end points.
306
+ *
307
+ * @template T - The vector type extending TVector
308
+ * @param p0 - Start point (returned when t = 0)
309
+ * @param p1 - End point (returned when t = 1)
310
+ * @param t0 - Tangent vector at start point
311
+ * @param t1 - Tangent vector at end point
312
+ * @param t - Interpolation parameter [0,1]
313
+ * @returns Vector interpolated using Hermite spline with tangent control
314
+ *
315
+ * @example
316
+ * const start = [0, 0];
317
+ * const end = [10, 10];
318
+ * const startTangent = [5, 0]; // Horizontal tangent at start
319
+ * const endTangent = [0, 5]; // Vertical tangent at end
320
+ * const curved = VectorHermiteInterpolation(start, end, startTangent, endTangent, 0.5);
321
+ */
322
+ export function VectorHermiteInterpolation(p0, p1, t0, t1, t) {
323
+ AssertVectors([p0, p1, t0, t1], { minSize: 1, finite: true });
324
+ AssertNumber(t);
325
+ const result = [];
326
+ for (let i = 0; i < p0.length; i++) {
327
+ const p0v = p0[i];
328
+ AssertVectorValue(p0v, {}, { index: i });
329
+ const p1v = p1[i];
330
+ AssertVectorValue(p1v, {}, { index: i });
331
+ const t0v = t0[i];
332
+ AssertVectorValue(t0v, {}, { index: i });
333
+ const t1v = t1[i];
334
+ AssertVectorValue(t1v, {}, { index: i });
335
+ result.push(HermiteInterpolation(p0v, p1v, t0v, t1v, t));
336
+ }
337
+ return result;
338
+ }
339
+ /**
340
+ * Performs circular ease-in interpolation between two vectors.
341
+ * Starts very slowly and accelerates using a circular arc.
342
+ *
343
+ * @template T - The vector type extending TVector
344
+ * @param a - Start vector
345
+ * @param b - End vector
346
+ * @param t - Interpolation parameter [0,1]
347
+ * @returns Vector with circular acceleration from start
348
+ */
349
+ export function VectorCircularEaseIn(a, b, t) {
350
+ AssertVectors([a, b], { minSize: 1, finite: true });
351
+ return vectorInterpolate(a, b, t, CircularEaseIn);
352
+ }
353
+ /**
354
+ * Performs circular ease-out interpolation between two vectors.
355
+ * Starts quickly and decelerates using a circular arc.
356
+ *
357
+ * @template T - The vector type extending TVector
358
+ * @param a - Start vector
359
+ * @param b - End vector
360
+ * @param t - Interpolation parameter [0,1]
361
+ * @returns Vector with circular deceleration toward end
362
+ */
363
+ export function VectorCircularEaseOut(a, b, t) {
364
+ AssertVectors([a, b], { minSize: 1, finite: true });
365
+ return vectorInterpolate(a, b, t, CircularEaseOut);
366
+ }
367
+ /**
368
+ * Performs step interpolation between two vectors.
369
+ * Abruptly switches from start to end vector at the specified threshold.
370
+ *
371
+ * @template T - The vector type extending TVector
372
+ * @param a - Start vector (returned when t < threshold)
373
+ * @param b - End vector (returned when t >= threshold)
374
+ * @param t - Interpolation parameter [0,1]
375
+ * @param threshold - Threshold value for the step (default: 0.5)
376
+ * @returns Either the start or end vector based on threshold comparison
377
+ *
378
+ * @example
379
+ * const off = [0, 0];
380
+ * const on = [1, 1];
381
+ * const result1 = VectorStepInterpolation(off, on, 0.3); // [0, 0] (< 0.5)
382
+ * const result2 = VectorStepInterpolation(off, on, 0.7); // [1, 1] (>= 0.5)
383
+ */
384
+ export function VectorStepInterpolation(a, b, t, threshold = 0.5) {
385
+ AssertVectors([a, b], { minSize: 1, finite: true });
386
+ AssertNumber(t);
387
+ AssertNumber(threshold);
388
+ const result = [];
389
+ for (let i = 0; i < a.length; i++) {
390
+ const av = a[i];
391
+ AssertVectorValue(av, {}, { index: i });
392
+ const bv = b[i];
393
+ AssertVectorValue(bv, {}, { index: i });
394
+ result.push(StepInterpolation(av, bv, t, threshold));
395
+ }
396
+ return result;
397
+ }
398
+ /**
399
+ * Performs quadratic ease-in-out interpolation between two vectors.
400
+ * Symmetrically accelerates at the start and decelerates at the end (2t² / 1−(−2t+2)²/2).
401
+ *
402
+ * @template T - The vector type extending TVector
403
+ * @param a - Start vector
404
+ * @param b - End vector
405
+ * @param t - Interpolation parameter [0,1]
406
+ * @returns Component-wise interpolated vector with quadratic symmetric easing
407
+ */
408
+ export function VectorQuadraticEaseInOut(a, b, t) {
409
+ return vectorInterpolate(a, b, t, QuadraticEaseInOut);
410
+ }
411
+ /**
412
+ * Performs cubic ease-in-out interpolation between two vectors.
413
+ * More pronounced symmetrical acceleration/deceleration than quadratic (4t³ / 1−(−2t+2)³/2).
414
+ *
415
+ * @template T - The vector type extending TVector
416
+ * @param a - Start vector
417
+ * @param b - End vector
418
+ * @param t - Interpolation parameter [0,1]
419
+ * @returns Component-wise interpolated vector with cubic symmetric easing
420
+ */
421
+ export function VectorCubicEaseInOut(a, b, t) {
422
+ return vectorInterpolate(a, b, t, CubicEaseInOut);
423
+ }
424
+ /**
425
+ * Performs sine ease-in-out interpolation between two vectors.
426
+ * Smooth symmetric easing based on a cosine curve — gentle and natural feeling.
427
+ *
428
+ * @template T - The vector type extending TVector
429
+ * @param a - Start vector
430
+ * @param b - End vector
431
+ * @param t - Interpolation parameter [0,1]
432
+ * @returns Component-wise interpolated vector with sine symmetric easing
433
+ */
434
+ export function VectorSineEaseInOut(a, b, t) {
435
+ return vectorInterpolate(a, b, t, SineEaseInOut);
436
+ }
437
+ /**
438
+ * Performs exponential ease-in-out interpolation between two vectors.
439
+ * Very slow at both ends with an extremely rapid transition in the middle.
440
+ *
441
+ * @template T - The vector type extending TVector
442
+ * @param a - Start vector
443
+ * @param b - End vector
444
+ * @param t - Interpolation parameter [0,1]
445
+ * @returns Component-wise interpolated vector with exponential symmetric easing
446
+ */
447
+ export function VectorExponentialEaseInOut(a, b, t) {
448
+ return vectorInterpolate(a, b, t, ExponentialEaseInOut);
449
+ }
450
+ /**
451
+ * Performs circular ease-in-out interpolation between two vectors.
452
+ * Smooth symmetric arc-based easing using a circular curve.
453
+ *
454
+ * @template T - The vector type extending TVector
455
+ * @param a - Start vector
456
+ * @param b - End vector
457
+ * @param t - Interpolation parameter [0,1]
458
+ * @returns Component-wise interpolated vector with circular symmetric easing
459
+ */
460
+ export function VectorCircularEaseInOut(a, b, t) {
461
+ return vectorInterpolate(a, b, t, CircularEaseInOut);
462
+ }
463
+ /**
464
+ * Performs elastic ease-in interpolation between two vectors.
465
+ * Spring-like acceleration from rest — starts with a backward bounce then launches forward.
466
+ *
467
+ * @template T - The vector type extending TVector
468
+ * @param a - Start vector
469
+ * @param b - End vector
470
+ * @param t - Interpolation parameter [0,1]
471
+ * @returns Component-wise interpolated vector with elastic acceleration from start
472
+ */
473
+ export function VectorElasticEaseIn(a, b, t) {
474
+ return vectorInterpolate(a, b, t, ElasticEaseIn);
475
+ }
476
+ /**
477
+ * Performs elastic ease-in-out interpolation between two vectors.
478
+ * Spring-like oscillation at both the start and end of the motion.
479
+ *
480
+ * @template T - The vector type extending TVector
481
+ * @param a - Start vector
482
+ * @param b - End vector
483
+ * @param t - Interpolation parameter [0,1]
484
+ * @returns Component-wise interpolated vector with elastic oscillation at both ends
485
+ */
486
+ export function VectorElasticEaseInOut(a, b, t) {
487
+ return vectorInterpolate(a, b, t, ElasticEaseInOut);
488
+ }
489
+ /**
490
+ * Performs back ease-in interpolation between two vectors.
491
+ * Applies a slight backward pull before launching forward from the start.
492
+ *
493
+ * @template T - The vector type extending TVector
494
+ * @param a - Start vector
495
+ * @param b - End vector
496
+ * @param t - Interpolation parameter [0,1]
497
+ * @returns Component-wise interpolated vector with back overshoot at start
498
+ */
499
+ export function VectorBackEaseIn(a, b, t) {
500
+ return vectorInterpolate(a, b, t, BackEaseIn);
501
+ }
502
+ /**
503
+ * Performs back ease-in-out interpolation between two vectors.
504
+ * Slight backward pull at both ends before and after the main forward motion.
505
+ *
506
+ * @template T - The vector type extending TVector
507
+ * @param a - Start vector
508
+ * @param b - End vector
509
+ * @param t - Interpolation parameter [0,1]
510
+ * @returns Component-wise interpolated vector with back overshoot at both ends
511
+ */
512
+ export function VectorBackEaseInOut(a, b, t) {
513
+ return vectorInterpolate(a, b, t, BackEaseInOut);
514
+ }
515
+ /**
516
+ * Performs bounce ease-in interpolation between two vectors.
517
+ * Bouncing ball effect at the start — multiple bounces before settling at the target.
518
+ *
519
+ * @template T - The vector type extending TVector
520
+ * @param a - Start vector
521
+ * @param b - End vector
522
+ * @param t - Interpolation parameter [0,1]
523
+ * @returns Component-wise interpolated vector with bounce effect at start
524
+ */
525
+ export function VectorBounceEaseIn(a, b, t) {
526
+ return vectorInterpolate(a, b, t, BounceEaseIn);
527
+ }
528
+ /**
529
+ * Performs bounce ease-in-out interpolation between two vectors.
530
+ * Bouncing ball effect at both the start and end of the motion.
531
+ *
532
+ * @template T - The vector type extending TVector
533
+ * @param a - Start vector
534
+ * @param b - End vector
535
+ * @param t - Interpolation parameter [0,1]
536
+ * @returns Component-wise interpolated vector with bounce effect at both ends
537
+ */
538
+ export function VectorBounceEaseInOut(a, b, t) {
539
+ return vectorInterpolate(a, b, t, BounceEaseInOut);
540
+ }
541
+ /** Threshold below which SLERP falls back to linear interpolation (nearly parallel vectors). */
542
+ const SLERP_LINEARITY_THRESHOLD = 0.001;
543
+ /**
544
+ * Performs spherical linear interpolation (SLERP) between two vectors.
545
+ * Interpolates along the shortest path on the unit sphere, maintaining constant angular velocity.
546
+ * Particularly useful for smooth rotation interpolation and direction vectors.
547
+ *
548
+ * @template T - The vector type extending TVector
549
+ * @param a - Start vector (will be normalized internally)
550
+ * @param b - End vector (will be normalized internally)
551
+ * @param t - Interpolation parameter (0 = a, 1 = b, allows extrapolation)
552
+ * @returns Spherically interpolated vector maintaining unit length
553
+ *
554
+ * @example
555
+ * const dir1 = [1, 0, 0];
556
+ * const dir2 = [0, 1, 0];
557
+ * const slerp = VectorSphericalLinearInterpolation(dir1, dir2, 0.5);
558
+ * // Result maintains unit length and follows shortest spherical path
559
+ */
560
+ export function VectorSphericalLinearInterpolation(a, b, t) {
561
+ AssertVectors([a, b], { minSize: 2, finite: true });
562
+ // Do not clamp t, allow extrapolation
563
+ const normalizedA = VectorNormalize(a);
564
+ const normalizedB = VectorNormalize(b);
565
+ const dot = Clamp(VectorDot(normalizedA, normalizedB), -1, 1);
566
+ const theta = Math.acos(dot);
567
+ // If vectors are nearly parallel, use linear interpolation
568
+ if (Math.abs(theta) < SLERP_LINEARITY_THRESHOLD) {
569
+ return VectorLERP(a, b, t);
570
+ }
571
+ const sinTheta = Math.sin(theta);
572
+ const weightA = Math.sin((1 - t) * theta) / sinTheta;
573
+ const weightB = Math.sin(t * theta) / sinTheta;
574
+ // Manually create the result to maintain proper typing
575
+ const result = [];
576
+ for (let i = 0; i < a.length; i++) {
577
+ const ai = a[i];
578
+ AssertVectorValue(ai, {}, { index: i });
579
+ const bi = b[i];
580
+ AssertVectorValue(bi, {}, { index: i });
581
+ result.push((ai * weightA) + (bi * weightB));
582
+ }
583
+ return result;
584
+ }
585
+ //# sourceMappingURL=interpolation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interpolation.js","sourceRoot":"","sources":["../../src/vectors/interpolation.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YA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QAChB,iBAAiB,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;QAExC,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,GAAG,OAAO,CAAC,CAAC,CAAC;IAC9C,CAAC;IAED,OAAO,MAA0B,CAAC;AACnC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=interpolation.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interpolation.spec.d.ts","sourceRoot":"","sources":["../../src/vectors/interpolation.spec.ts"],"names":[],"mappings":""}