curvy 1.0.8 → 2.0.0-alpha.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.
Files changed (139) hide show
  1. package/dist/characteristic/index.d.mts +88 -0
  2. package/dist/characteristic/index.mjs +2 -0
  3. package/dist/curve/index.d.mts +2 -0
  4. package/dist/curve/index.mjs +2 -0
  5. package/dist/interval/index.d.mts +2 -0
  6. package/dist/interval/index.mjs +2 -0
  7. package/dist/matrix/index.d.mts +2 -0
  8. package/dist/matrix/index.mjs +267 -0
  9. package/dist/matrix/index.mjs.map +1 -0
  10. package/dist/number.d.mts +280 -0
  11. package/dist/number.mjs +140 -0
  12. package/dist/number.mjs.map +1 -0
  13. package/dist/path/index.d.mts +241 -0
  14. package/dist/path/index.mjs +292 -0
  15. package/dist/path/index.mjs.map +1 -0
  16. package/dist/polynomial/index.d.mts +2 -0
  17. package/dist/polynomial/index.mjs +3 -0
  18. package/dist/shared/characteristic-BGRxcxUH.mjs +104 -0
  19. package/dist/shared/characteristic-BGRxcxUH.mjs.map +1 -0
  20. package/dist/shared/chunk-25Hzd3z8.mjs +13 -0
  21. package/dist/shared/cubic-CYYEUHNm.mjs +479 -0
  22. package/dist/shared/cubic-CYYEUHNm.mjs.map +1 -0
  23. package/dist/shared/cubic-Dfn6DB02.d.mts +1099 -0
  24. package/dist/shared/interval-CCEqzPgA.mjs +376 -0
  25. package/dist/shared/interval-CCEqzPgA.mjs.map +1 -0
  26. package/dist/shared/interval-hQDiKqj0.d.mts +494 -0
  27. package/dist/shared/matrix4x4-Bt_DBlP0.d.mts +1182 -0
  28. package/dist/shared/matrix4x4-Ck2WROK-.mjs +440 -0
  29. package/dist/shared/matrix4x4-Ck2WROK-.mjs.map +1 -0
  30. package/dist/shared/quadratic-DEhuAKuE.mjs +330 -0
  31. package/dist/shared/quadratic-DEhuAKuE.mjs.map +1 -0
  32. package/dist/shared/rationalCubic2d-BPLohNuI.d.mts +787 -0
  33. package/dist/shared/rationalCubic2d-CP4oGpnk.mjs +658 -0
  34. package/dist/shared/rationalCubic2d-CP4oGpnk.mjs.map +1 -0
  35. package/dist/shared/rationalCubic2d-CXa7Yren.mjs +278 -0
  36. package/dist/shared/rationalCubic2d-CXa7Yren.mjs.map +1 -0
  37. package/dist/shared/rationalCubic2d-D_-XWxcm.d.mts +297 -0
  38. package/dist/shared/solution-BjoW7ov4.d.mts +251 -0
  39. package/dist/shared/solution-CbSWzXCn.mjs +306 -0
  40. package/dist/shared/solution-CbSWzXCn.mjs.map +1 -0
  41. package/dist/{pipe.d.mts → shared/utils-DqTGyXrP.d.mts} +44 -26
  42. package/dist/shared/vector2-CL1HDdPr.mjs +187 -0
  43. package/dist/shared/vector2-CL1HDdPr.mjs.map +1 -0
  44. package/dist/shared/vector2-TV0UnlxY.d.mts +1168 -0
  45. package/dist/shared/vector2.internal-DU_E808S.mjs +97 -0
  46. package/dist/shared/vector2.internal-DU_E808S.mjs.map +1 -0
  47. package/dist/shared/vector3-D-tv_aKL.mjs +204 -0
  48. package/dist/shared/vector3-D-tv_aKL.mjs.map +1 -0
  49. package/dist/shared/vector4-5KbjoHVj.mjs +109 -0
  50. package/dist/shared/vector4-5KbjoHVj.mjs.map +1 -0
  51. package/dist/shared/vector4.internal-5XcaX12X.mjs +163 -0
  52. package/dist/shared/vector4.internal-5XcaX12X.mjs.map +1 -0
  53. package/dist/solution/index.d.mts +2 -0
  54. package/dist/solution/index.mjs +2 -0
  55. package/dist/splines/index.d.mts +701 -0
  56. package/dist/splines/index.mjs +734 -0
  57. package/dist/splines/index.mjs.map +1 -0
  58. package/dist/utils.d.mts +2 -27
  59. package/dist/utils.mjs +88 -43
  60. package/dist/utils.mjs.map +1 -0
  61. package/dist/vector/index.d.mts +2 -0
  62. package/dist/vector/index.mjs +4 -0
  63. package/package.json +49 -92
  64. package/dist/curve/cubic2d.d.mts +0 -31
  65. package/dist/curve/cubic2d.d.ts +0 -31
  66. package/dist/curve/cubic2d.mjs +0 -97
  67. package/dist/curve/linear2d.d.mts +0 -28
  68. package/dist/curve/linear2d.d.ts +0 -28
  69. package/dist/curve/linear2d.mjs +0 -49
  70. package/dist/curve/quadratic2d.d.mts +0 -33
  71. package/dist/curve/quadratic2d.d.ts +0 -33
  72. package/dist/curve/quadratic2d.mjs +0 -87
  73. package/dist/interval.d.mts +0 -58
  74. package/dist/interval.d.ts +0 -58
  75. package/dist/interval.mjs +0 -89
  76. package/dist/matrix/matrix2x2.d.mts +0 -49
  77. package/dist/matrix/matrix2x2.d.ts +0 -49
  78. package/dist/matrix/matrix2x2.mjs +0 -24
  79. package/dist/matrix/matrix3x3.d.mts +0 -63
  80. package/dist/matrix/matrix3x3.d.ts +0 -63
  81. package/dist/matrix/matrix3x3.mjs +0 -27
  82. package/dist/matrix/matrix4x4.d.mts +0 -72
  83. package/dist/matrix/matrix4x4.d.ts +0 -72
  84. package/dist/matrix/matrix4x4.mjs +0 -215
  85. package/dist/path/cubic2d.d.mts +0 -29
  86. package/dist/path/cubic2d.d.ts +0 -29
  87. package/dist/path/cubic2d.mjs +0 -62
  88. package/dist/path/linear2d.d.mts +0 -29
  89. package/dist/path/linear2d.d.ts +0 -29
  90. package/dist/path/linear2d.mjs +0 -55
  91. package/dist/path/quadratic2d.d.mts +0 -30
  92. package/dist/path/quadratic2d.d.ts +0 -30
  93. package/dist/path/quadratic2d.mjs +0 -61
  94. package/dist/pipe.d.ts +0 -58
  95. package/dist/pipe.mjs +0 -91
  96. package/dist/polynomial/cubic.d.mts +0 -7
  97. package/dist/polynomial/cubic.d.ts +0 -7
  98. package/dist/polynomial/cubic.mjs +0 -148
  99. package/dist/polynomial/linear.d.mts +0 -7
  100. package/dist/polynomial/linear.d.ts +0 -7
  101. package/dist/polynomial/linear.mjs +0 -23
  102. package/dist/polynomial/quadratic.d.mts +0 -7
  103. package/dist/polynomial/quadratic.d.ts +0 -7
  104. package/dist/polynomial/quadratic.mjs +0 -24
  105. package/dist/shared/curvy.BDhiZ7He.mjs +0 -80
  106. package/dist/shared/curvy.BZ_mTkJe.mjs +0 -60
  107. package/dist/shared/curvy.Bf5TIk31.d.mts +0 -22
  108. package/dist/shared/curvy.Bf5TIk31.d.ts +0 -22
  109. package/dist/shared/curvy.BsHoYJNv.d.ts +0 -155
  110. package/dist/shared/curvy.BzVmUIKm.mjs +0 -131
  111. package/dist/shared/curvy.C2XGH0R0.mjs +0 -75
  112. package/dist/shared/curvy.CE4X6_Is.mjs +0 -181
  113. package/dist/shared/curvy.Cps2R_RU.mjs +0 -120
  114. package/dist/shared/curvy.Cv-wIzDr.mjs +0 -124
  115. package/dist/shared/curvy.DmVFTi0N.mjs +0 -34
  116. package/dist/shared/curvy.NsmY7zcr.d.mts +0 -155
  117. package/dist/shared/curvy.wYJQhFW-.mjs +0 -87
  118. package/dist/splines/basis2d.d.mts +0 -38
  119. package/dist/splines/basis2d.d.ts +0 -38
  120. package/dist/splines/basis2d.mjs +0 -89
  121. package/dist/splines/bezier2d.d.mts +0 -48
  122. package/dist/splines/bezier2d.d.ts +0 -48
  123. package/dist/splines/bezier2d.mjs +0 -22
  124. package/dist/splines/cardinal2d.d.mts +0 -49
  125. package/dist/splines/cardinal2d.d.ts +0 -49
  126. package/dist/splines/cardinal2d.mjs +0 -123
  127. package/dist/splines/hermite2d.d.mts +0 -33
  128. package/dist/splines/hermite2d.d.ts +0 -33
  129. package/dist/splines/hermite2d.mjs +0 -77
  130. package/dist/utils.d.ts +0 -27
  131. package/dist/vector/vector2.d.mts +0 -66
  132. package/dist/vector/vector2.d.ts +0 -66
  133. package/dist/vector/vector2.mjs +0 -28
  134. package/dist/vector/vector3.d.mts +0 -77
  135. package/dist/vector/vector3.d.ts +0 -77
  136. package/dist/vector/vector3.mjs +0 -32
  137. package/dist/vector/vector4.d.mts +0 -43
  138. package/dist/vector/vector4.d.ts +0 -43
  139. package/dist/vector/vector4.mjs +0 -18
@@ -0,0 +1,1168 @@
1
+ import { t as Pipeable } from "./utils-DqTGyXrP.mjs";
2
+
3
+ //#region src/dimensions.d.ts
4
+ type TwoDimensionalIndex = 0 | 1;
5
+ type TwoDimensionalComponent = 'x' | 'y';
6
+ interface TwoDimensional<out T1, out T2 = T1> {
7
+ readonly x: T1;
8
+ readonly y: T2;
9
+ readonly 0: T1;
10
+ readonly 1: T2;
11
+ }
12
+ type ThreeDimensionalIndex = TwoDimensionalIndex | 2;
13
+ type ThreeDimensionalComponent = TwoDimensionalComponent | 'z';
14
+ interface ThreeDimensional<out T1, out T2 = T1, out T3 = T2> extends TwoDimensional<T1, T2> {
15
+ readonly z: T3;
16
+ readonly 2: T3;
17
+ }
18
+ type FourDimensionalIndex = ThreeDimensionalIndex | 3;
19
+ type FourDimensionalComponent = ThreeDimensionalComponent | 'w';
20
+ interface FourDimensional<out T1, out T2 = T1, out T3 = T2, out T4 = T3> extends ThreeDimensional<T1, T2, T3> {
21
+ readonly w: T4;
22
+ readonly 3: T4;
23
+ }
24
+ //#endregion
25
+ //#region src/vector/vector4.internal.d.ts
26
+ declare const Vector4TypeId: unique symbol;
27
+ type Vector4TypeId = typeof Vector4TypeId;
28
+ declare namespace vector4_d_exports {
29
+ export { Vector4, add$2 as add, components$2 as components, dot$2 as dot, equals$2 as equals, hadamard$2 as hadamard, isVector4, magnitude$2 as magnitude, make$2 as make, normalize$2 as normalize, scale$2 as scale, softmax$2 as softmax, subtract$2 as subtract, transpose$2 as transpose, unit$2 as unit, zero$2 as zero };
30
+ }
31
+ /**
32
+ * A 4D vector.
33
+ *
34
+ * All fields are readonly and immutable, and all operations create new instances.
35
+ *
36
+ * @since 1.0.0
37
+ */
38
+ interface Vector4 extends Pipeable, FourDimensional<number> {
39
+ readonly [Vector4TypeId]: Vector4TypeId;
40
+ }
41
+ /**
42
+ * Checks if a value is a `Vector4`.
43
+ *
44
+ * @param v - The value to check.
45
+ * @returns `true` if the value is a `Vector4`, `false` otherwise.
46
+ * @since 1.0.0
47
+ */
48
+ declare const isVector4: (v: unknown) => v is Vector4;
49
+ declare const equals$2: {
50
+ /**
51
+ * Checks if two `Vector4` instances are approximately equal within the
52
+ * default absolute tolerance ({@link EPSILON}).
53
+ *
54
+ * @param a - The first vector.
55
+ * @param b - The second vector.
56
+ * @returns `true` when each pair of components is within tolerance.
57
+ * @since 1.1.0
58
+ */
59
+ (a: Vector4, b: Vector4): boolean;
60
+ /**
61
+ * Checks if two `Vector4` instances are approximately equal within the
62
+ * default absolute tolerance ({@link EPSILON}).
63
+ *
64
+ * @param b - The second vector.
65
+ * @returns A function that takes the first vector and returns the comparison result.
66
+ * @since 1.1.0
67
+ */
68
+ (b: Vector4): (a: Vector4) => boolean;
69
+ };
70
+ declare const make$2: {
71
+ /**
72
+ * Creates a new `Vector4` instance.
73
+ *
74
+ * @param xyzw - The x, y, z, and w components of the vector.
75
+ * @returns A new `Vector4` instance.
76
+ * @since 1.0.0
77
+ */
78
+ (xyzw: number): Vector4;
79
+ /**
80
+ * Creates a new `Vector4` instance.
81
+ *
82
+ * @param x - The x component of the vector.
83
+ * @param yzw - The y, z, and w components of the vector.
84
+ * @returns A new `Vector4` instance.
85
+ * @since 1.0.0
86
+ */
87
+ (x: number, yzw: number): Vector4;
88
+ /**
89
+ * Creates a new `Vector4` instance.
90
+ *
91
+ * @param x - The x component of the vector.
92
+ * @param y - The y component of the vector.
93
+ * @param zw - The z and w components of the vector.
94
+ * @returns A new `Vector4` instance.
95
+ * @since 1.0.0
96
+ */
97
+ (x: number, y: number, zw: number): Vector4;
98
+ /**
99
+ * Creates a new `Vector4` instance.
100
+ *
101
+ * @param x - The x component of the vector.
102
+ * @param y - The y component of the vector.
103
+ * @param z - The z component of the vector.
104
+ * @param w - The w component of the vector.
105
+ * @returns A new `Vector4` instance.
106
+ * @since 1.0.0
107
+ */
108
+ (x: number, y: number, z: number, w: number): Vector4;
109
+ };
110
+ /**
111
+ * Transposes a 4-tuple of items into one or more `Vector4`s, one per channel
112
+ * extracted by the projection function.
113
+ *
114
+ * For each output channel, takes the corresponding number from each of the
115
+ * four projected items and packs them into a `Vector4` — the data-layout
116
+ * transformation NumPy calls a transpose, FP calls `unzip`, GPUs call a
117
+ * gather, and DSP people inexplicably call deinterleaving.
118
+ *
119
+ * The projection's return-tuple arity determines the number of output
120
+ * vectors, and that arity is preserved in the return type.
121
+ *
122
+ * @example
123
+ * ```ts
124
+ * // Pack the x and y coordinates of four control points into two Vector4s.
125
+ * const [xs, ys] = Vector4.transpose(
126
+ * [p0, p1, p2, p3],
127
+ * (p) => [p.x, p.y],
128
+ * )
129
+ * ```
130
+ *
131
+ * @param inputs - Exactly four items of any type.
132
+ * @param project - A function returning a fixed-arity tuple of numbers — one per output channel.
133
+ * @returns A tuple of `Vector4`s with the same arity as the projection's return tuple.
134
+ * @since 2.1.0
135
+ */
136
+ declare const transpose$2: <T, const Channels extends ReadonlyArray<number>>(inputs: readonly [T, T, T, T], project: (item: T) => Channels) => { readonly [K in keyof Channels]: Vector4 };
137
+ /**
138
+ * Gets the magnitude of a `Vector4`.
139
+ *
140
+ * @param vector - The vector to calculate the magnitude of.
141
+ * @returns The magnitude of the vector.
142
+ * @since 1.0.0
143
+ */
144
+ declare const magnitude$2: (vector: Vector4) => number;
145
+ /**
146
+ * Normalizes a `Vector4`.
147
+ *
148
+ * @param vector - The vector to normalize.
149
+ * @returns A new `Vector4` instance with the same direction as the input vector but with a magnitude of 1.
150
+ * @since 1.0.0
151
+ */
152
+ declare const normalize$2: (vector: Vector4) => Vector4;
153
+ declare const dot$2: {
154
+ /**
155
+ * Computes the dot product of two `Vector4` instances.
156
+ *
157
+ * @param a - The first vector.
158
+ * @param b - The second vector.
159
+ * @returns The dot product of the two vectors.
160
+ * @since 1.0.0
161
+ */
162
+ (a: Vector4, b: Vector4): number;
163
+ /**
164
+ * Computes the dot product of a `Vector4` instance and another vector.
165
+ *
166
+ * @param b - The second vector.
167
+ * @returns A function that takes the first vector and returns the dot product.
168
+ * @since 1.0.0
169
+ */
170
+ (b: Vector4): (a: Vector4) => number;
171
+ };
172
+ /**
173
+ * Returns the components of a `Vector4` as an array.
174
+ *
175
+ * @param v - The vector to get the components of.
176
+ * @returns An array containing the x, y, z, and w components of the vector.
177
+ * @since 1.0.0
178
+ */
179
+ declare const components$2: (v: Vector4) => [number, number, number, number];
180
+ /**
181
+ * Applies the softmax function to a `Vector4`.
182
+ *
183
+ * @param v - The vector to calculate the softmax of.
184
+ * @returns A new `Vector4` instance representing the softmax of the input vector.
185
+ */
186
+ declare const softmax$2: (v: Vector4) => Vector4;
187
+ /**
188
+ * Creates a zero vector.
189
+ *
190
+ * @since 1.0.0
191
+ */
192
+ declare const zero$2: Vector4;
193
+ /**
194
+ * Creates a unit vector.
195
+ *
196
+ * @since 1.0.0
197
+ */
198
+ declare const unit$2: Vector4;
199
+ declare const add$2: {
200
+ /**
201
+ * Adds two `Vector4` instances.
202
+ *
203
+ * @param a - The first vector.
204
+ * @param b - The second vector.
205
+ * @returns A new `Vector4` instance representing the sum of the two vectors.
206
+ * @since 1.0.0
207
+ */
208
+ (a: Vector4, b: Vector4): Vector4;
209
+ /**
210
+ * Adds a `Vector4` instance to another vector.
211
+ *
212
+ * @param b - The second vector.
213
+ * @returns A function that takes the first vector and returns the sum.
214
+ * @since 1.0.0
215
+ */
216
+ (b: Vector4): (a: Vector4) => Vector4;
217
+ };
218
+ declare const subtract$2: {
219
+ /**
220
+ * Subtracts one `Vector4` instance from another.
221
+ *
222
+ * @param a - The first vector.
223
+ * @param b - The second vector.
224
+ * @returns A new `Vector4` instance representing the difference of the two vectors.
225
+ * @since 1.0.0
226
+ */
227
+ (a: Vector4, b: Vector4): Vector4;
228
+ /**
229
+ * Subtracts a `Vector4` instance from another vector.
230
+ *
231
+ * @param b - The second vector.
232
+ * @returns A function that takes the first vector and returns the difference.
233
+ * @since 1.0.0
234
+ */
235
+ (b: Vector4): (a: Vector4) => Vector4;
236
+ };
237
+ declare const hadamard$2: {
238
+ /**
239
+ * Computes the Hadamard product of two `Vector4` instances.
240
+ *
241
+ * @param a - The first vector.
242
+ * @param b - The second vector.
243
+ * @returns A new `Vector4` instance representing the Hadamard product of the two vectors.
244
+ * @since 1.0.0
245
+ */
246
+ (a: Vector4, b: Vector4): Vector4;
247
+ /**
248
+ * Computes the Hadamard product of a `Vector4` instance and another vector.
249
+ *
250
+ * @param b - The second vector.
251
+ * @returns A function that takes the first vector and returns the Hadamard product.
252
+ * @since 1.0.0
253
+ */
254
+ (b: Vector4): (a: Vector4) => Vector4;
255
+ };
256
+ declare const scale$2: {
257
+ /**
258
+ * Scales a `Vector4` by a scalar.
259
+ *
260
+ * @param s - The scalar to scale the vector by.
261
+ * @returns A function that takes the vector and returns the scaled vector.
262
+ * @since 1.0.0
263
+ */
264
+ (s: number): (v: Vector4) => Vector4;
265
+ /**
266
+ * Scales a `Vector4` by a scalar.
267
+ *
268
+ * @param s - The scalar to scale the vector by.
269
+ * @param v - The vector to scale.
270
+ * @returns A new `Vector4` instance representing the scaled vector.
271
+ * @since 1.0.0
272
+ */
273
+ (v: Vector4, s: number): Vector4;
274
+ };
275
+ //#endregion
276
+ //#region src/vector/vector3.internal.d.ts
277
+ declare const Vector3TypeId: unique symbol;
278
+ type Vector3TypeId = typeof Vector3TypeId;
279
+ declare namespace vector3_d_exports {
280
+ export { Vector3, add$1 as add, components$1 as components, cross$1 as cross, dot$1 as dot, equals$1 as equals, fromSpherical, getPhi, getR$1 as getR, getTheta$1 as getTheta, getX$1 as getX, getY$1 as getY, getZ, hadamard$1 as hadamard, isVector3, length, magnitude$1 as magnitude, make$1 as make, normalize$1 as normalize, scale$1 as scale, setPhi, setR$1 as setR, setTheta$1 as setTheta, setX$1 as setX, setY$1 as setY, setZ, softmax$1 as softmax, subtract$1 as subtract, transpose$1 as transpose, unit$1 as unit, unitX, unitY, unitZ, zero$1 as zero };
281
+ }
282
+ /**
283
+ * A 3D vector.
284
+ *
285
+ * All fields are readonly and immutable, and all operations create new instances.
286
+ *
287
+ * @since 1.0.0
288
+ */
289
+ interface Vector3 extends Pipeable, ThreeDimensional<number> {
290
+ readonly [Vector3TypeId]: Vector3TypeId;
291
+ }
292
+ /**
293
+ * Checks if a value is a `Vector3`.
294
+ *
295
+ * @param v - The value to check.
296
+ * @returns `true` if the value is a `Vector3`, `false` otherwise.
297
+ * @since 1.0.0
298
+ */
299
+ declare const isVector3: (v: unknown) => v is Vector3;
300
+ declare const equals$1: {
301
+ /**
302
+ * Checks if two `Vector3` instances are approximately equal within the
303
+ * default absolute tolerance ({@link EPSILON}).
304
+ *
305
+ * @param a - The first vector.
306
+ * @param b - The second vector.
307
+ * @returns `true` when each pair of components is within tolerance.
308
+ * @since 1.1.0
309
+ */
310
+ (a: Vector3, b: Vector3): boolean;
311
+ /**
312
+ * Checks if two `Vector3` instances are approximately equal within the
313
+ * default absolute tolerance ({@link EPSILON}).
314
+ *
315
+ * @param b - The second vector.
316
+ * @returns A function that takes the first vector and returns the comparison result.
317
+ * @since 1.1.0
318
+ */
319
+ (b: Vector3): (a: Vector3) => boolean;
320
+ };
321
+ declare const make$1: {
322
+ /**
323
+ * Creates a new `Vector3` instance.
324
+ *
325
+ * @param xyz - The x, y, and z components of the vector.
326
+ * @returns A new `Vector3` instance.
327
+ * @since 1.0.0
328
+ */
329
+ (xyz: number): Vector3;
330
+ /**
331
+ * Creates a new `Vector3` instance.
332
+ *
333
+ * @param x - The x component of the vector.
334
+ * @param yz - The y and z components of the vector.
335
+ * @returns A new `Vector3` instance.
336
+ * @since 1.0.0
337
+ */
338
+ (x: number, yz: number): Vector3;
339
+ /**
340
+ * Creates a new `Vector3` instance.
341
+ *
342
+ * @param x - The x component of the vector.
343
+ * @param y - The y component of the vector.
344
+ * @param z - The z component of the vector.
345
+ * @returns A new `Vector3` instance.
346
+ * @since 1.0.0
347
+ */
348
+ (x: number, y: number, z: number): Vector3;
349
+ };
350
+ /**
351
+ * Transposes a 3-tuple of items into one or more `Vector3`s, one per channel
352
+ * extracted by the projection function. See {@link Vector4.transpose} for the
353
+ * full operation description; this is the 3-component analog.
354
+ *
355
+ * @param inputs - Exactly three items of any type.
356
+ * @param project - A function returning a fixed-arity tuple of numbers — one per output channel.
357
+ * @returns A tuple of `Vector3`s with the same arity as the projection's return tuple.
358
+ * @since 2.1.0
359
+ */
360
+ declare const transpose$1: <T, const Channels extends ReadonlyArray<number>>(inputs: readonly [T, T, T], project: (item: T) => Channels) => { readonly [K in keyof Channels]: Vector3 };
361
+ /**
362
+ * Creates a new `Vector3` instance from spherical coordinates.
363
+ *
364
+ * @param r - The radius.
365
+ * @param theta - The polar angle, in radians. Ranges from 0 to π
366
+ * @param phi - The azimuthal angle, in radians. Ranges from 0 to 2π
367
+ * @returns A new `Vector3` instance.
368
+ * @since 1.0.0
369
+ */
370
+ declare const fromSpherical: (r: number, theta: number, phi: number) => Vector3;
371
+ /**
372
+ * Calculates the magnitude of a `Vector3`.
373
+ *
374
+ * @param vector - The vector to calculate the magnitude of.
375
+ * @returns The magnitude of the vector.
376
+ * @since 1.0.0
377
+ */
378
+ declare const magnitude$1: (vector: Vector3) => number;
379
+ /**
380
+ * Calculates the length of a `Vector3`.
381
+ *
382
+ * @param vector - The vector to calculate the length of.
383
+ * @returns The length of the vector.
384
+ * @see {@link magnitude}
385
+ * @since 1.0.0
386
+ */
387
+ declare const length: (vector: Vector3) => number;
388
+ /**
389
+ * Normalizes a `Vector3`.
390
+ *
391
+ * @param vector - The vector to normalize.
392
+ * @returns A new `Vector3` instance with the same direction as the input vector, but with a magnitude of 1.
393
+ * @since 1.0.0
394
+ */
395
+ declare const normalize$1: (vector: Vector3) => Vector3;
396
+ declare const dot$1: {
397
+ /**
398
+ * Calculates the dot product of two `Vector3` instances.
399
+ *
400
+ * @param a - The first vector.
401
+ * @param b - The second vector.
402
+ * @returns The dot product of the two vectors.
403
+ * @since 1.0.0
404
+ */
405
+ (a: Vector3, b: Vector3): number;
406
+ /**
407
+ * Calculates the dot product of two `Vector3` instances.
408
+ *
409
+ * @param b - The second vector.
410
+ * @returns A function that takes the first vector and returns the dot product.
411
+ * @since 1.0.0
412
+ */
413
+ (b: Vector3): (a: Vector3) => number;
414
+ };
415
+ declare const cross$1: {
416
+ /**
417
+ * Calculates the cross product of two `Vector3` instances.
418
+ *
419
+ * @param a - The first vector.
420
+ * @param b - The second vector.
421
+ * @returns A new `Vector3` instance representing the cross product of the two vectors.
422
+ * @since 1.0.0
423
+ */
424
+ (a: Vector3, b: Vector3): Vector3;
425
+ /**
426
+ * Calculates the cross product of two `Vector3` instances.
427
+ *
428
+ * @param b - The second vector.
429
+ * @returns A function that takes the first vector and returns the cross product.
430
+ * @since 1.0.0
431
+ */
432
+ (b: Vector3): (a: Vector3) => Vector3;
433
+ };
434
+ /**
435
+ * Returns the components of a `Vector3` as an array.
436
+ *
437
+ * @param v - The vector to get the components of.
438
+ * @returns An array containing the x, y, and z components of the vector.
439
+ * @since 1.0.0
440
+ */
441
+ declare const components$1: (v: Vector3) => [number, number, number];
442
+ /**
443
+ * Calculates the softmax of a `Vector3`.
444
+ *
445
+ * @param v - The vector to calculate the softmax of.
446
+ * @returns A new `Vector3` instance representing the softmax of the input vector.
447
+ * @since 1.0.0
448
+ */
449
+ declare const softmax$1: (v: Vector3) => Vector3;
450
+ /**
451
+ * Creates a zero vector.
452
+ *
453
+ * @since 1.0.0
454
+ */
455
+ declare const zero$1: Vector3;
456
+ /**
457
+ * Creates a unit vector.
458
+ *
459
+ * @since 1.0.0
460
+ */
461
+ declare const unit$1: Vector3;
462
+ /**
463
+ * Creates a unit vector in the x direction.
464
+ *
465
+ * @since 1.0.0
466
+ */
467
+ declare const unitX: Vector3;
468
+ /**
469
+ * Creates a unit vector in the y direction.
470
+ *
471
+ * @since 1.0.0
472
+ */
473
+ declare const unitY: Vector3;
474
+ /**
475
+ * Creates a unit vector in the z direction.
476
+ *
477
+ * @since 1.0.0
478
+ */
479
+ declare const unitZ: Vector3;
480
+ declare const add$1: {
481
+ /**
482
+ * Adds two `Vector3` instances.
483
+ *
484
+ * @param a - The first vector.
485
+ * @param b - The second vector.
486
+ * @returns A new `Vector3` instance representing the sum of the two vectors.
487
+ * @since 1.0.0
488
+ */
489
+ (a: Vector3, b: Vector3): Vector3;
490
+ /**
491
+ * Adds two `Vector3` instances.
492
+ *
493
+ * @param b - The second vector.
494
+ * @returns A function that takes the first vector and returns the sum.
495
+ * @since 1.0.0
496
+ */
497
+ (b: Vector3): (a: Vector3) => Vector3;
498
+ };
499
+ declare const subtract$1: {
500
+ /**
501
+ * Subtracts one `Vector3` instance from another.
502
+ *
503
+ * @param a - The vector to subtract from.
504
+ * @param b - The vector to subtract.
505
+ * @returns A new `Vector3` instance representing the difference of the two vectors.
506
+ * @since 1.0.0
507
+ */
508
+ (a: Vector3, b: Vector3): Vector3;
509
+ /**
510
+ * Subtracts one `Vector3` instance from another.
511
+ *
512
+ * @param b - The vector to subtract.
513
+ * @returns A function that takes the first vector and returns the difference.
514
+ * @since 1.0.0
515
+ */
516
+ (b: Vector3): (a: Vector3) => Vector3;
517
+ };
518
+ declare const hadamard$1: {
519
+ /**
520
+ * Calculates the Hadamard product of two `Vector3` instances.
521
+ *
522
+ * The Hadamard product is an element-wise multiplication of two vectors.
523
+ *
524
+ * @param a - The first vector.
525
+ * @param b - The second vector.
526
+ * @returns A new `Vector3` instance representing the Hadamard product of the two vectors.
527
+ * @since 1.0.0
528
+ */
529
+ (a: Vector3, b: Vector3): Vector3;
530
+ /**
531
+ * Calculates the Hadamard product of two `Vector3` instances.
532
+ *
533
+ * The Hadamard product is an element-wise multiplication of two vectors.
534
+ *
535
+ * @param b - The second vector.
536
+ * @returns A function that takes the first vector and returns the Hadamard product.
537
+ * @since 1.0.0
538
+ */
539
+ (b: Vector3): (a: Vector3) => Vector3;
540
+ };
541
+ declare const scale$1: {
542
+ /**
543
+ * Scales a `Vector3` instance by a scalar value.
544
+ *
545
+ * @param s - The scalar value to scale by.
546
+ * @return A function that takes a vector and returns the scaled vector.
547
+ * @since 1.0.0
548
+ */
549
+ (s: number): (v: Vector3) => Vector3;
550
+ /**
551
+ * Scales a `Vector3` instance by a scalar value.
552
+ *
553
+ * @param s - The scalar value to scale by.
554
+ * @param v - The vector to scale.
555
+ * @returns A new `Vector3` instance representing the scaled vector.
556
+ * @since 1.0.0
557
+ */
558
+ (v: Vector3, s: number): Vector3;
559
+ };
560
+ /**
561
+ * Gets the x component of a `Vector3`.
562
+ *
563
+ * @param v - The vector to get the x component of.
564
+ * @returns The x component of the vector.
565
+ * @since 1.0.0
566
+ */
567
+ declare const getX$1: (v: Vector3) => number;
568
+ declare const setX$1: {
569
+ /**
570
+ * Sets the x component of a `Vector3`.
571
+ *
572
+ * @param v - The vector to set the x component of.
573
+ * @param x - The new x component.
574
+ * @returns A new `Vector3` instance with the updated x component.
575
+ * @since 1.0.0
576
+ */
577
+ (v: Vector3, x: number): Vector3;
578
+ /**
579
+ * Sets the x component of a `Vector3`.
580
+ *
581
+ * @param x - The new x component.
582
+ * @returns A function that takes the vector and returns a new `Vector3` instance with the updated x component.
583
+ * @since 1.0.0
584
+ */
585
+ (x: number): (v: Vector3) => Vector3;
586
+ };
587
+ /**
588
+ * Gets the y component of a `Vector3`.
589
+ *
590
+ * @param v - The vector of which to get the y component.
591
+ * @returns The y component of the vector.
592
+ * @since 1.0.0
593
+ */
594
+ declare const getY$1: (v: Vector3) => number;
595
+ declare const setY$1: {
596
+ /**
597
+ * Sets the y component of a `Vector3`.
598
+ *
599
+ * @param v - The vector of which to set the y component.
600
+ * @param y - The new y component.
601
+ * @returns A new `Vector3` instance with the updated y component.
602
+ * @since 1.0.0
603
+ */
604
+ (v: Vector3, y: number): Vector3;
605
+ /**
606
+ * Sets the y component of a `Vector3`.
607
+ *
608
+ * @param y - The new y component.
609
+ * @returns A function that takes the vector and returns a new `Vector3` instance with the updated y component.
610
+ * @since 1.0.0
611
+ */
612
+ (y: number): (v: Vector3) => Vector3;
613
+ };
614
+ /**
615
+ * Gets the z component of a `Vector3`.
616
+ *
617
+ * @param v - The vector of which to get the z component.
618
+ * @returns The z component of the vector.
619
+ * @since 1.0.0
620
+ */
621
+ declare const getZ: (v: Vector3) => number;
622
+ declare const setZ: {
623
+ /**
624
+ * Sets the z component of a `Vector3`.
625
+ *
626
+ * @param v - The vector of which to set the z component.
627
+ * @param z - The new z component.
628
+ * @returns A new `Vector3` instance with the updated z component.
629
+ * @since 1.0.0
630
+ */
631
+ (v: Vector3, z: number): Vector3;
632
+ /**
633
+ * Sets the z component of a `Vector3`.
634
+ *
635
+ * @param z - The new z component.
636
+ * @returns A function that takes the vector and returns a new `Vector3` instance with the updated z component.
637
+ * @since 1.0.0
638
+ */
639
+ (z: number): (v: Vector3) => Vector3;
640
+ };
641
+ /**
642
+ * Gets the radius of a `Vector3`.
643
+ *
644
+ * @param v - The vector of which to get the radius.
645
+ * @returns The radius of the vector.
646
+ * @since 1.0.0
647
+ */
648
+ declare const getR$1: (v: Vector3) => number;
649
+ declare const setR$1: {
650
+ /**
651
+ * Sets the radius of a `Vector3`.
652
+ *
653
+ * @param v - The vector of which to set the radius.
654
+ * @param r - The new radius.
655
+ * @returns A new `Vector3` instance with the updated radius.
656
+ * @since 1.0.0
657
+ */
658
+ (v: Vector3, r: number): Vector3;
659
+ /**
660
+ * Sets the radius of a `Vector3`.
661
+ *
662
+ * @param r - The new radius.
663
+ * @returns A function that takes the vector and returns the updated vector.
664
+ * @since 1.0.0
665
+ */
666
+ (r: number): (v: Vector3) => Vector3;
667
+ };
668
+ /**
669
+ * Gets the polar angle (theta) of a `Vector3`.
670
+ *
671
+ * @param v - The vector of which to get the polar angle.
672
+ * @returns The polar angle of the vector.
673
+ * @since 1.0.0
674
+ */
675
+ declare const getTheta$1: (v: Vector3) => number;
676
+ declare const setTheta$1: {
677
+ /**
678
+ * Sets the polar angle (theta) of a `Vector3`.
679
+ *
680
+ * @param v - The vector of which to set the polar angle.
681
+ * @param theta - The new polar angle.
682
+ * @returns A new `Vector3` instance with the updated polar angle.
683
+ * @since 1.0.0
684
+ */
685
+ (v: Vector3, theta: number): Vector3;
686
+ /**
687
+ * Sets the polar angle (theta) of a `Vector3`.
688
+ *
689
+ * @param theta - The new polar angle.
690
+ * @returns A function that takes the vector and returns the updated vector.
691
+ * @since 1.0.0
692
+ */
693
+ (theta: number): (v: Vector3) => Vector3;
694
+ };
695
+ /**
696
+ * Gets the azimuthal angle (phi) of a `Vector3`.
697
+ *
698
+ * @param v - The vector of which to get the azimuthal angle.
699
+ * @returns The azimuthal angle of the vector.
700
+ * @since 1.0.0
701
+ */
702
+ declare const getPhi: (v: Vector3) => number;
703
+ declare const setPhi: {
704
+ /**
705
+ * Sets the azimuthal angle (phi) of a `Vector3`.
706
+ *
707
+ * @param v - The vector of which to set the azimuthal angle.
708
+ * @param phi - The new azimuthal angle.
709
+ * @returns A new `Vector3` instance with the updated azimuthal angle.
710
+ * @since 1.0.0
711
+ */
712
+ (v: Vector3, phi: number): Vector3;
713
+ /**
714
+ * Sets the azimuthal angle (phi) of a `Vector3`.
715
+ *
716
+ * @param phi - The new azimuthal angle.
717
+ * @returns A function that takes the vector and returns the updated vector.
718
+ * @since 1.0.0
719
+ */
720
+ (phi: number): (v: Vector3) => Vector3;
721
+ };
722
+ //#endregion
723
+ //#region src/vector/vector2.internal.d.ts
724
+ declare const Vector2TypeId: unique symbol;
725
+ type Vector2TypeId = typeof Vector2TypeId;
726
+ declare const WeightedVector2TypeId: unique symbol;
727
+ type WeightedVector2TypeId = typeof WeightedVector2TypeId;
728
+ declare namespace vector2_d_exports {
729
+ export { Vector2, Weighted, add, components, cross, dot, equals, fromPolar, getR, getTheta, getX, getY, hadamard, isVector2, isWeighted, magnitude, make, makeWeighted, normalize, scale, setR, setTheta, setX, setY, softmax, subtract, transpose, unit, unweighted, weightedEquals, withWeight, zero };
730
+ }
731
+ /**
732
+ * A 2D vector.
733
+ *
734
+ * All fields are readonly and immutable, and all operations create new instances.
735
+ *
736
+ * @since 1.0.0
737
+ */
738
+ interface Vector2 extends Pipeable, TwoDimensional<number> {
739
+ readonly [Vector2TypeId]: Vector2TypeId;
740
+ }
741
+ /**
742
+ * A 2D point with an associated positive scalar weight.
743
+ *
744
+ * Used by rational primitives (e.g. `RationalBezier2d`) where each control
745
+ * point carries an influence weight. The interface is structurally distinct
746
+ * from `Vector2` — its brand prevents accidental use with vector arithmetic
747
+ * (`add`, `subtract`, `scale`, etc.) where weighted operations are not
748
+ * well-defined.
749
+ *
750
+ * Construct via {@link makeWeighted} (from raw components) or
751
+ * {@link withWeight} (from an existing `Vector2`).
752
+ *
753
+ * @since 2.1.0
754
+ */
755
+ interface Weighted extends Pipeable {
756
+ readonly [WeightedVector2TypeId]: WeightedVector2TypeId;
757
+ readonly x: number;
758
+ readonly y: number;
759
+ readonly weight: number;
760
+ }
761
+ /**
762
+ * Checks if a value is a `Vector2`.
763
+ *
764
+ * @param v - The value to check.
765
+ * @returns `true` if the value is a `Vector2`, `false` otherwise.
766
+ * @since 1.0.0
767
+ */
768
+ declare const isVector2: (v: unknown) => v is Vector2;
769
+ /**
770
+ * Checks if a value is a `Vector2.Weighted`.
771
+ *
772
+ * @param v - The value to check.
773
+ * @returns `true` if the value is a `Vector2.Weighted`, `false` otherwise.
774
+ * @since 2.1.0
775
+ */
776
+ declare const isWeighted: (v: unknown) => v is Weighted;
777
+ /**
778
+ * Creates a new `Vector2.Weighted` from raw components. The weight must be
779
+ * finite and positive.
780
+ *
781
+ * @param x - The x component.
782
+ * @param y - The y component.
783
+ * @param weight - The positive scalar weight.
784
+ * @returns A new `Vector2.Weighted` instance.
785
+ * @since 2.1.0
786
+ */
787
+ declare const makeWeighted: (x: number, y: number, weight: number) => Weighted;
788
+ declare const withWeight: {
789
+ /**
790
+ * Promotes a `Vector2` to a `Vector2.Weighted` by attaching the given
791
+ * positive scalar weight.
792
+ *
793
+ * @param v - The point to weight.
794
+ * @param weight - The positive scalar weight.
795
+ * @returns A new `Vector2.Weighted` instance.
796
+ * @since 2.1.0
797
+ */
798
+ (v: Vector2, weight: number): Weighted;
799
+ /**
800
+ * Promotes a `Vector2` to a `Vector2.Weighted` by attaching the given
801
+ * positive scalar weight.
802
+ *
803
+ * @param weight - The positive scalar weight.
804
+ * @returns A function that takes a `Vector2` and returns a weighted point.
805
+ * @since 2.1.0
806
+ */
807
+ (weight: number): (v: Vector2) => Weighted;
808
+ };
809
+ /**
810
+ * Strips the weight from a `Vector2.Weighted`, returning the underlying point.
811
+ *
812
+ * @param w - The weighted point.
813
+ * @returns A new `Vector2` instance with the same x and y components.
814
+ * @since 2.1.0
815
+ */
816
+ declare const unweighted: (w: Weighted) => Vector2;
817
+ declare const weightedEquals: {
818
+ /**
819
+ * Checks if two `Vector2.Weighted` instances are approximately equal —
820
+ * point components and weight all within the default absolute tolerance.
821
+ *
822
+ * @param a - The first weighted point.
823
+ * @param b - The second weighted point.
824
+ * @returns `true` when components and weight are within tolerance.
825
+ * @since 2.1.0
826
+ */
827
+ (a: Weighted, b: Weighted): boolean;
828
+ /**
829
+ * Checks if two `Vector2.Weighted` instances are approximately equal.
830
+ *
831
+ * @param b - The second weighted point.
832
+ * @returns A function that takes the first weighted point and returns the comparison result.
833
+ * @since 2.1.0
834
+ */
835
+ (b: Weighted): (a: Weighted) => boolean;
836
+ };
837
+ declare const equals: {
838
+ /**
839
+ * Checks if two `Vector2` instances are approximately equal within the
840
+ * default absolute tolerance ({@link EPSILON}).
841
+ *
842
+ * @param a - The first vector.
843
+ * @param b - The second vector.
844
+ * @returns `true` when each pair of components is within tolerance.
845
+ * @since 1.1.0
846
+ */
847
+ (a: Vector2, b: Vector2): boolean;
848
+ /**
849
+ * Checks if two `Vector2` instances are approximately equal within the
850
+ * default absolute tolerance ({@link EPSILON}).
851
+ *
852
+ * @param b - The second vector.
853
+ * @returns A function that takes the first vector and returns the comparison result.
854
+ * @since 1.1.0
855
+ */
856
+ (b: Vector2): (a: Vector2) => boolean;
857
+ };
858
+ declare const make: {
859
+ /**
860
+ * Creates a new `Vector2` instance.
861
+ *
862
+ * @param xy - The x and y components of the vector.
863
+ * @returns A new `Vector2` instance.
864
+ * @since 1.0.0
865
+ */
866
+ (xy: number): Vector2;
867
+ /**
868
+ * Creates a new `Vector2` instance.
869
+ *
870
+ * @param x - The x component of the vector.
871
+ * @param y - The y component of the vector.
872
+ * @returns A new `Vector2` instance.
873
+ * @since 1.0.0
874
+ */
875
+ (x: number, y: number): Vector2;
876
+ };
877
+ /**
878
+ * Transposes a 2-tuple of items into one or more `Vector2`s, one per channel
879
+ * extracted by the projection function. See {@link Vector4.transpose} for the
880
+ * full operation description; this is the 2-component analog.
881
+ *
882
+ * @param inputs - Exactly two items of any type.
883
+ * @param project - A function returning a fixed-arity tuple of numbers — one per output channel.
884
+ * @returns A tuple of `Vector2`s with the same arity as the projection's return tuple.
885
+ * @since 2.1.0
886
+ */
887
+ declare const transpose: <T, const Channels extends ReadonlyArray<number>>(inputs: readonly [T, T], project: (item: T) => Channels) => { readonly [K in keyof Channels]: Vector2 };
888
+ /**
889
+ * Creates a new `Vector2` instance from polar coordinates.
890
+ *
891
+ * @param r - The radius.
892
+ * @param theta - The angle, in radians.
893
+ * @returns A new `Vector2` instance.
894
+ * @since 1.0.0
895
+ */
896
+ declare const fromPolar: (r: number, theta: number) => Vector2;
897
+ /**
898
+ * Calculates the magnitude of a `Vector2`.
899
+ *
900
+ * @param vector - The vector to calculate the magnitude of.
901
+ * @returns The magnitude of the vector.
902
+ * @since 1.0.0
903
+ */
904
+ declare const magnitude: (vector: Vector2) => number;
905
+ /**
906
+ * Normalizes a `Vector2`.
907
+ *
908
+ * @param vector - The vector to normalize.
909
+ * @returns A new `Vector2` instance with the same direction and a magnitude of 1.
910
+ * @since 1.0.0
911
+ */
912
+ declare const normalize: (vector: Vector2) => Vector2;
913
+ declare const dot: {
914
+ /**
915
+ * Calculates the dot product of two `Vector2` instances.
916
+ *
917
+ * @param a - The first vector.
918
+ * @param b - The second vector.
919
+ * @returns The dot product of the two vectors.
920
+ * @since 1.0.0
921
+ */
922
+ (a: Vector2, b: Vector2): number;
923
+ /**
924
+ * Calculates the dot product of two `Vector2` instances.
925
+ *
926
+ * @param b - The second vector.
927
+ * @returns A function that takes the first vector and returns the dot product.
928
+ * @since 1.0.0
929
+ */
930
+ (b: Vector2): (a: Vector2) => number;
931
+ };
932
+ declare const cross: {
933
+ /**
934
+ * Calculates the cross product of two `Vector2` instances.
935
+ *
936
+ * @param a - The first vector.
937
+ * @param b - The second vector.
938
+ * @returns The cross product of the two vectors.
939
+ * @since 1.0.0
940
+ */
941
+ (a: Vector2, b: Vector2): number;
942
+ /**
943
+ * Calculates the cross product of two `Vector2` instances.
944
+ *
945
+ * @param b - The second vector.
946
+ * @returns A function that takes the first vector and returns the cross product.
947
+ * @since 1.0.0
948
+ */
949
+ (b: Vector2): (a: Vector2) => number;
950
+ };
951
+ /**
952
+ * Returns the components of a `Vector2` as an array.
953
+ *
954
+ * @param r - The radius.
955
+ * @param theta - The angle, in radians.
956
+ * @returns A new `Vector2` instance.
957
+ * @since 1.0.0
958
+ */
959
+ declare const components: (v: Vector2) => [number, number];
960
+ /**
961
+ * Applies the softmax function to a `Vector2`.
962
+ *
963
+ * @param v - The vector to apply the softmax function to.
964
+ * @returns A new `Vector2` instance with the softmax applied.
965
+ * @since 1.0.0
966
+ */
967
+ declare const softmax: (v: Vector2) => Vector2;
968
+ /**
969
+ * Creates a zero vector.
970
+ *
971
+ * @returns A new `Vector2` instance with both components set to 0.
972
+ * @since 1.0.0
973
+ */
974
+ declare const zero: Vector2;
975
+ /**
976
+ * Creates a unit vector.
977
+ *
978
+ * @returns A new `Vector2` instance with both components set to 1.
979
+ * @since 1.0.0
980
+ */
981
+ declare const unit: Vector2;
982
+ declare const add: {
983
+ /**
984
+ * Adds two `Vector2` instances together.
985
+ *
986
+ * @param a - The first vector.
987
+ * @param b - The second vector.
988
+ * @returns A new `Vector2` instance representing the sum of the two vectors.
989
+ * @since 1.0.0
990
+ */
991
+ (a: Vector2, b: Vector2): Vector2;
992
+ /**
993
+ * Adds two `Vector2` instances together.
994
+ *
995
+ * @param b - The second vector.
996
+ * @returns A function that takes the first vector and returns the sum.
997
+ * @since 1.0.0
998
+ */
999
+ (b: Vector2): (a: Vector2) => Vector2;
1000
+ };
1001
+ declare const subtract: {
1002
+ /**
1003
+ * Subtracts one `Vector2` instance from another.
1004
+ *
1005
+ * @param a - The first vector.
1006
+ * @param b - The second vector.
1007
+ * @returns A new `Vector2` instance representing the difference of the two vectors.
1008
+ * @since 1.0.0
1009
+ */
1010
+ (a: Vector2, b: Vector2): Vector2;
1011
+ /**
1012
+ * Subtracts one `Vector2` instance from another.
1013
+ *
1014
+ * @param b - The second vector.
1015
+ * @returns A function that takes the first vector and returns the difference.
1016
+ * @since 1.0.0
1017
+ */
1018
+ (b: Vector2): (a: Vector2) => Vector2;
1019
+ };
1020
+ declare const hadamard: {
1021
+ /**
1022
+ * Performs the Hadamard product of two `Vector2` instances.
1023
+ *
1024
+ * @param a - The first vector.
1025
+ * @param b - The second vector.
1026
+ * @returns A new `Vector2` instance representing the Hadamard product of the two vectors.
1027
+ * @since 1.0.0
1028
+ */
1029
+ (a: Vector2, b: Vector2): Vector2;
1030
+ /**
1031
+ * Performs the Hadamard product of two `Vector2` instances.
1032
+ *
1033
+ * @param b - The second vector.
1034
+ * @returns A function that takes the first vector and returns the Hadamard product.
1035
+ * @since 1.0.0
1036
+ */
1037
+ (b: Vector2): (a: Vector2) => Vector2;
1038
+ };
1039
+ declare const scale: {
1040
+ /**
1041
+ * Scales a `Vector2` by a scalar value.
1042
+ *
1043
+ * @param s - The scalar value to scale by.
1044
+ * @returns A function that takes a vector and returns the scaled vector.
1045
+ * @since 1.0.0
1046
+ */
1047
+ (s: number): (v: Vector2) => Vector2;
1048
+ /**
1049
+ * Scales a `Vector2` by a scalar value.
1050
+ *
1051
+ * @param v - The vector to scale.
1052
+ * @param s - The scalar value to scale by.
1053
+ * @returns A new `Vector2` instance representing the scaled vector.
1054
+ * @since 1.0.0
1055
+ */
1056
+ (v: Vector2, s: number): Vector2;
1057
+ };
1058
+ /**
1059
+ * Gets the x component of a `Vector2`.
1060
+ *
1061
+ * @param v - The vector to get the x component from.
1062
+ * @returns The x component of the vector.
1063
+ * @since 1.0.0
1064
+ */
1065
+ declare const getX: (v: Vector2) => number;
1066
+ declare const setX: {
1067
+ /**
1068
+ * Sets the x component of a `Vector2`.
1069
+ *
1070
+ * @param v - The vector to set the x component of.
1071
+ * @param x - The new x component.
1072
+ * @returns A new `Vector2` instance with the updated x component.
1073
+ * @since 1.0.0
1074
+ */
1075
+ (v: Vector2, x: number): Vector2;
1076
+ /**
1077
+ * Sets the x component of a `Vector2`.
1078
+ *
1079
+ * @param x - The new x component.
1080
+ * @returns A function that takes a vector and returns the updated vector.
1081
+ * @since 1.0.0
1082
+ */
1083
+ (x: number): (v: Vector2) => Vector2;
1084
+ };
1085
+ /**
1086
+ * Gets the y component of a `Vector2`.
1087
+ *
1088
+ * @param v - The vector to get the y component from.
1089
+ * @returns The y component of the vector.
1090
+ * @since 1.0.0
1091
+ */
1092
+ declare const getY: (v: Vector2) => number;
1093
+ declare const setY: {
1094
+ /**
1095
+ * Sets the y component of a `Vector2`.
1096
+ *
1097
+ * @param v - The vector to set the y component of.
1098
+ * @param y - The new y component.
1099
+ * @returns A new `Vector2` instance with the updated y component.
1100
+ * @since 1.0.0
1101
+ */
1102
+ (v: Vector2, y: number): Vector2;
1103
+ /**
1104
+ * Sets the y component of a `Vector2`.
1105
+ *
1106
+ * @param y - The new y component.
1107
+ * @returns A function that takes a vector and returns the updated vector.
1108
+ * @since 1.0.0
1109
+ */
1110
+ (y: number): (v: Vector2) => Vector2;
1111
+ };
1112
+ /**
1113
+ * Gets the radius of a `Vector2`.
1114
+ *
1115
+ * @param v - The vector to get the radius from.
1116
+ * @returns The radius of the vector.
1117
+ * @since 1.0.0
1118
+ */
1119
+ declare const getR: (v: Vector2) => number;
1120
+ declare const setR: {
1121
+ /**
1122
+ * Sets the radius of a `Vector2`.
1123
+ *
1124
+ * @param v - The vector to set the radius of.
1125
+ * @param r - The new radius.
1126
+ * @returns A new `Vector2` instance with the updated radius.
1127
+ * @since 1.0.0
1128
+ */
1129
+ (v: Vector2, r: number): Vector2;
1130
+ /**
1131
+ * Sets the radius of a `Vector2`.
1132
+ *
1133
+ * @param r - The new radius.
1134
+ * @returns A function that takes a vector and returns the updated vector.
1135
+ * @since 1.0.0
1136
+ */
1137
+ (r: number): (v: Vector2) => Vector2;
1138
+ };
1139
+ /**
1140
+ * Gets the angle of a `Vector2`.
1141
+ *
1142
+ * @param v - The vector to get the angle from.
1143
+ * @returns The angle of the vector in radians.
1144
+ * @since 1.0.0
1145
+ */
1146
+ declare const getTheta: (v: Vector2) => number;
1147
+ declare const setTheta: {
1148
+ /**
1149
+ * Sets the angle of a `Vector2`.
1150
+ *
1151
+ * @param v - The vector to set the angle of.
1152
+ * @param theta - The new angle, in radians.
1153
+ * @returns A new `Vector2` instance with the updated angle.
1154
+ * @since 1.0.0
1155
+ */
1156
+ (v: Vector2, theta: number): Vector2;
1157
+ /**
1158
+ * Sets the angle of a `Vector2`.
1159
+ *
1160
+ * @param theta - The new angle, in radians.
1161
+ * @returns A function that takes a vector and returns the updated vector.
1162
+ * @since 1.0.0
1163
+ */
1164
+ (theta: number): (v: Vector2) => Vector2;
1165
+ };
1166
+ //#endregion
1167
+ export { vector3_d_exports as a, FourDimensionalComponent as c, ThreeDimensionalIndex as d, TwoDimensional as f, Vector3 as i, FourDimensionalIndex as l, TwoDimensionalIndex as m, Weighted as n, Vector4 as o, TwoDimensionalComponent as p, vector2_d_exports as r, vector4_d_exports as s, Vector2 as t, ThreeDimensionalComponent as u };
1168
+ //# sourceMappingURL=vector2-TV0UnlxY.d.mts.map