curvy 1.0.9 → 2.0.0-alpha.2

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 (173) 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 +3 -0
  6. package/dist/interval/index.mjs +3 -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 +261 -0
  14. package/dist/path/index.mjs +325 -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-B9nCh_cx.mjs +104 -0
  19. package/dist/shared/characteristic-B9nCh_cx.mjs.map +1 -0
  20. package/dist/shared/chunk-25Hzd3z8.mjs +13 -0
  21. package/dist/shared/cubic-BajUY0JT.d.mts +1100 -0
  22. package/dist/shared/cubic-CpHAx8cC.mjs +479 -0
  23. package/dist/shared/cubic-CpHAx8cC.mjs.map +1 -0
  24. package/dist/shared/interval-05CR6eBf.mjs +421 -0
  25. package/dist/shared/interval-05CR6eBf.mjs.map +1 -0
  26. package/dist/shared/interval-Dy-RMEE3.d.mts +533 -0
  27. package/dist/shared/interval2d-8IBZnUOq.mjs +108 -0
  28. package/dist/shared/interval2d-8IBZnUOq.mjs.map +1 -0
  29. package/dist/shared/interval2d-C2id9u31.d.mts +172 -0
  30. package/dist/shared/matrix4x4-Ck2WROK-.mjs +440 -0
  31. package/dist/shared/matrix4x4-Ck2WROK-.mjs.map +1 -0
  32. package/dist/shared/matrix4x4-Dm_tSiH1.d.mts +1183 -0
  33. package/dist/shared/quadratic-CamozcFc.mjs +330 -0
  34. package/dist/shared/quadratic-CamozcFc.mjs.map +1 -0
  35. package/dist/shared/rationalCubic2d-B6g97ryJ.d.mts +308 -0
  36. package/dist/shared/rationalCubic2d-BEgUGSFf.mjs +295 -0
  37. package/dist/shared/rationalCubic2d-BEgUGSFf.mjs.map +1 -0
  38. package/dist/shared/rationalCubic2d-Bys2Uory.mjs +695 -0
  39. package/dist/shared/rationalCubic2d-Bys2Uory.mjs.map +1 -0
  40. package/dist/shared/rationalCubic2d-DlQfBURs.d.mts +818 -0
  41. package/dist/shared/solution-CrtLfqEq.mjs +306 -0
  42. package/dist/shared/solution-CrtLfqEq.mjs.map +1 -0
  43. package/dist/shared/solution-sNQ-ZVhN.d.mts +251 -0
  44. package/dist/{pipe.d.mts → shared/utils-MCckigYk.d.mts} +44 -26
  45. package/dist/shared/vector2-CL1HDdPr.mjs +187 -0
  46. package/dist/shared/vector2-CL1HDdPr.mjs.map +1 -0
  47. package/dist/shared/vector2-DPUY3_eA.d.mts +470 -0
  48. package/dist/shared/vector2.internal-DU_E808S.mjs +97 -0
  49. package/dist/shared/vector2.internal-DU_E808S.mjs.map +1 -0
  50. package/dist/shared/vector3-D-tv_aKL.mjs +204 -0
  51. package/dist/shared/vector3-D-tv_aKL.mjs.map +1 -0
  52. package/dist/shared/vector3-DqeOZtOB.d.mts +703 -0
  53. package/dist/shared/vector4-5KbjoHVj.mjs +109 -0
  54. package/dist/shared/vector4-5KbjoHVj.mjs.map +1 -0
  55. package/dist/shared/vector4.internal-5XcaX12X.mjs +163 -0
  56. package/dist/shared/vector4.internal-5XcaX12X.mjs.map +1 -0
  57. package/dist/solution/index.d.mts +2 -0
  58. package/dist/solution/index.mjs +2 -0
  59. package/dist/splines/index.d.mts +701 -0
  60. package/dist/splines/index.mjs +734 -0
  61. package/dist/splines/index.mjs.map +1 -0
  62. package/dist/utils.d.mts +2 -205
  63. package/dist/utils.mjs +88 -52
  64. package/dist/utils.mjs.map +1 -1
  65. package/dist/vector/index.d.mts +3 -0
  66. package/dist/vector/index.mjs +4 -0
  67. package/package.json +49 -92
  68. package/dist/curve/cubic2d.d.mts +0 -109
  69. package/dist/curve/cubic2d.d.ts +0 -109
  70. package/dist/curve/cubic2d.mjs +0 -80
  71. package/dist/curve/cubic2d.mjs.map +0 -1
  72. package/dist/curve/linear2d.d.mts +0 -94
  73. package/dist/curve/linear2d.d.ts +0 -94
  74. package/dist/curve/linear2d.mjs +0 -46
  75. package/dist/curve/linear2d.mjs.map +0 -1
  76. package/dist/curve/quadratic2d.d.mts +0 -117
  77. package/dist/curve/quadratic2d.d.ts +0 -117
  78. package/dist/curve/quadratic2d.mjs +0 -82
  79. package/dist/curve/quadratic2d.mjs.map +0 -1
  80. package/dist/interval.d.mts +0 -251
  81. package/dist/interval.d.ts +0 -251
  82. package/dist/interval.mjs +0 -86
  83. package/dist/interval.mjs.map +0 -1
  84. package/dist/matrix/matrix2x2.d.mts +0 -320
  85. package/dist/matrix/matrix2x2.d.ts +0 -320
  86. package/dist/matrix/matrix2x2.mjs +0 -25
  87. package/dist/matrix/matrix2x2.mjs.map +0 -1
  88. package/dist/matrix/matrix3x3.d.mts +0 -370
  89. package/dist/matrix/matrix3x3.d.ts +0 -370
  90. package/dist/matrix/matrix3x3.mjs +0 -28
  91. package/dist/matrix/matrix3x3.mjs.map +0 -1
  92. package/dist/matrix/matrix4x4.d.mts +0 -381
  93. package/dist/matrix/matrix4x4.d.ts +0 -381
  94. package/dist/matrix/matrix4x4.mjs +0 -178
  95. package/dist/matrix/matrix4x4.mjs.map +0 -1
  96. package/dist/path/cubic2d.d.mts +0 -95
  97. package/dist/path/cubic2d.d.ts +0 -95
  98. package/dist/path/cubic2d.mjs +0 -60
  99. package/dist/path/cubic2d.mjs.map +0 -1
  100. package/dist/path/linear2d.d.mts +0 -95
  101. package/dist/path/linear2d.d.ts +0 -95
  102. package/dist/path/linear2d.mjs +0 -53
  103. package/dist/path/linear2d.mjs.map +0 -1
  104. package/dist/path/quadratic2d.d.mts +0 -95
  105. package/dist/path/quadratic2d.d.ts +0 -95
  106. package/dist/path/quadratic2d.mjs +0 -57
  107. package/dist/path/quadratic2d.mjs.map +0 -1
  108. package/dist/pipe.d.ts +0 -58
  109. package/dist/pipe.mjs +0 -92
  110. package/dist/pipe.mjs.map +0 -1
  111. package/dist/polynomial/cubic.d.mts +0 -7
  112. package/dist/polynomial/cubic.d.ts +0 -7
  113. package/dist/polynomial/cubic.mjs +0 -133
  114. package/dist/polynomial/cubic.mjs.map +0 -1
  115. package/dist/polynomial/linear.d.mts +0 -7
  116. package/dist/polynomial/linear.d.ts +0 -7
  117. package/dist/polynomial/linear.mjs +0 -24
  118. package/dist/polynomial/linear.mjs.map +0 -1
  119. package/dist/polynomial/quadratic.d.mts +0 -7
  120. package/dist/polynomial/quadratic.d.ts +0 -7
  121. package/dist/polynomial/quadratic.mjs +0 -27
  122. package/dist/polynomial/quadratic.mjs.map +0 -1
  123. package/dist/shared/curvy.Bf5TIk31.d.mts +0 -22
  124. package/dist/shared/curvy.Bf5TIk31.d.ts +0 -22
  125. package/dist/shared/curvy.BkkW8Tx9.mjs +0 -102
  126. package/dist/shared/curvy.BkkW8Tx9.mjs.map +0 -1
  127. package/dist/shared/curvy.BxdGW9he.mjs +0 -116
  128. package/dist/shared/curvy.BxdGW9he.mjs.map +0 -1
  129. package/dist/shared/curvy.C_sCeg9J.mjs +0 -66
  130. package/dist/shared/curvy.C_sCeg9J.mjs.map +0 -1
  131. package/dist/shared/curvy.Cg8lZVUz.d.ts +0 -688
  132. package/dist/shared/curvy.DCt1gGII.mjs +0 -147
  133. package/dist/shared/curvy.DCt1gGII.mjs.map +0 -1
  134. package/dist/shared/curvy.DJ4xO0al.mjs +0 -63
  135. package/dist/shared/curvy.DJ4xO0al.mjs.map +0 -1
  136. package/dist/shared/curvy.DmVFTi0N.mjs +0 -35
  137. package/dist/shared/curvy.DmVFTi0N.mjs.map +0 -1
  138. package/dist/shared/curvy.FDaj5rlj.d.mts +0 -688
  139. package/dist/shared/curvy.lktriTpx.mjs +0 -101
  140. package/dist/shared/curvy.lktriTpx.mjs.map +0 -1
  141. package/dist/shared/curvy.mLFprrGm.mjs +0 -85
  142. package/dist/shared/curvy.mLFprrGm.mjs.map +0 -1
  143. package/dist/shared/curvy.r6f1j287.mjs +0 -76
  144. package/dist/shared/curvy.r6f1j287.mjs.map +0 -1
  145. package/dist/splines/basis2d.d.mts +0 -130
  146. package/dist/splines/basis2d.d.ts +0 -130
  147. package/dist/splines/basis2d.mjs +0 -90
  148. package/dist/splines/basis2d.mjs.map +0 -1
  149. package/dist/splines/bezier2d.d.mts +0 -182
  150. package/dist/splines/bezier2d.d.ts +0 -182
  151. package/dist/splines/bezier2d.mjs +0 -23
  152. package/dist/splines/bezier2d.mjs.map +0 -1
  153. package/dist/splines/cardinal2d.d.mts +0 -178
  154. package/dist/splines/cardinal2d.d.ts +0 -178
  155. package/dist/splines/cardinal2d.mjs +0 -114
  156. package/dist/splines/cardinal2d.mjs.map +0 -1
  157. package/dist/splines/hermite2d.d.mts +0 -124
  158. package/dist/splines/hermite2d.d.ts +0 -124
  159. package/dist/splines/hermite2d.mjs +0 -63
  160. package/dist/splines/hermite2d.mjs.map +0 -1
  161. package/dist/utils.d.ts +0 -205
  162. package/dist/vector/vector2.d.mts +0 -324
  163. package/dist/vector/vector2.d.ts +0 -324
  164. package/dist/vector/vector2.mjs +0 -30
  165. package/dist/vector/vector2.mjs.map +0 -1
  166. package/dist/vector/vector3.d.mts +0 -417
  167. package/dist/vector/vector3.d.ts +0 -417
  168. package/dist/vector/vector3.mjs +0 -38
  169. package/dist/vector/vector3.mjs.map +0 -1
  170. package/dist/vector/vector4.d.mts +0 -205
  171. package/dist/vector/vector4.d.ts +0 -205
  172. package/dist/vector/vector4.mjs +0 -20
  173. package/dist/vector/vector4.mjs.map +0 -1
@@ -1,320 +0,0 @@
1
- import { d as TwoDimensionalIndex, e as TwoDimensionalComponent } from '../shared/curvy.Bf5TIk31.mjs';
2
- import { Pipeable } from '../pipe.mjs';
3
- import { Vector2 } from '../vector/vector2.mjs';
4
-
5
- declare const Matrix2x2TypeId: unique symbol;
6
- type Matrix2x2TypeId = typeof Matrix2x2TypeId;
7
-
8
- /**
9
- * A type representing the coordinate of a 2D matrix.
10
- *
11
- * @since 1.0.0
12
- */
13
- type Matrix2x2Coordinate = TwoDimensionalIndex | TwoDimensionalComponent;
14
- /**
15
- * A 2D matrix with 2 rows and 2 columns.
16
- *
17
- * All fields are readonly and immutable, and all operations create new instances.
18
- *
19
- * @since 1.0.0
20
- */
21
- interface Matrix2x2 extends Pipeable {
22
- readonly [Matrix2x2TypeId]: Matrix2x2TypeId;
23
- /**
24
- * The value in the first row and first column.
25
- */
26
- readonly m00: number;
27
- /**
28
- * The value in the first row and second column.
29
- */
30
- readonly m01: number;
31
- /**
32
- * The value in the second row and first column.
33
- */
34
- readonly m10: number;
35
- /**
36
- * The value in the second row and second column.
37
- */
38
- readonly m11: number;
39
- }
40
- /**
41
- * Checks if a value is a `Matrix2x2`.
42
- *
43
- * @param m - The value to check.
44
- * @returns `true` if the value is a `Matrix2x2`, `false` otherwise.
45
- * @since 1.0.0
46
- */
47
- declare const isMatrix2x2: (m: unknown) => m is Matrix2x2;
48
- /**
49
- * Creates a new `Matrix2x2` instance.
50
- *
51
- * @param m00 - The value in the first row and first column. Defaults to 0.
52
- * @param m01 - The value in the first row and second column. Defaults to 0.
53
- * @param m10 - The value in the second row and first column. Defaults to 0.
54
- * @param m11 - The value in the second row and second column. Defaults to 0.
55
- */
56
- declare const make: (m00?: number, m01?: number, m10?: number, m11?: number) => Matrix2x2;
57
- /**
58
- * Creates a new `Matrix2x2` instance from two vectors representing rows.
59
- *
60
- * @param v0 - The first row vector.
61
- * @param v1 - The second row vector.
62
- * @returns A new `Matrix2x2` instance.
63
- * @since 1.0.0
64
- */
65
- declare const fromRows: (v0: Vector2, v1: Vector2) => Matrix2x2;
66
- /**
67
- * Creates a new `Matrix2x2` instance from two vectors representing columns.
68
- *
69
- * @param v0 - The first column vector.
70
- * @param v1 - The second column vector.
71
- * @returns A new `Matrix2x2` instance.
72
- * @since 1.0.0
73
- */
74
- declare const fromColumns: (v0: Vector2, v1: Vector2) => Matrix2x2;
75
- declare const setRow: {
76
- /**
77
- * Sets the specified row of the matrix to the given vector.
78
- *
79
- * @param m - The matrix to modify.
80
- * @param row - The row index (0 or 1).
81
- * @param v - The vector to set the row to.
82
- * @returns A new `Matrix2x2` instance with the specified row set to the given vector.
83
- * @since 1.0.0
84
- */
85
- (m: Matrix2x2, row: Matrix2x2Coordinate, v: Vector2): Matrix2x2;
86
- /**
87
- * Sets the specified row of the matrix to the given vector.
88
- *
89
- * @param row - The row index (0 or 1).
90
- * @param v - The vector to set the row to.
91
- * @returns A function that takes a matrix and returns a new `Matrix2x2` instance with the specified row set to the given vector.
92
- * @since 1.0.0
93
- */
94
- (row: Matrix2x2Coordinate, v: Vector2): (m: Matrix2x2) => Matrix2x2;
95
- };
96
- declare const setColumn: {
97
- /**
98
- * Sets the specified column of the matrix to the given vector.
99
- *
100
- * @param m - The matrix to modify.
101
- * @param column - The column index (0 or 1).
102
- * @param v - The vector to set the column to.
103
- * @returns A new `Matrix2x2` instance with the specified column set to the given vector.
104
- * @since 1.0.0
105
- */
106
- (m: Matrix2x2, column: Matrix2x2Coordinate, v: Vector2): Matrix2x2;
107
- /**
108
- * Sets the specified column of the matrix to the given vector.
109
- *
110
- * @param column - The column index (0 or 1).
111
- * @param v - The vector to set the column to.
112
- * @returns A function that takes a matrix and returns a new `Matrix2x2` instance with the specified column set to the given vector.
113
- * @since 1.0.0
114
- */
115
- (column: Matrix2x2Coordinate, v: Vector2): (m: Matrix2x2) => Matrix2x2;
116
- };
117
- /**
118
- * Calculates the determinant of a 2D matrix.
119
- *
120
- * @param m - The matrix to calculate the determinant for.
121
- * @returns The determinant of the matrix.
122
- * @since 1.0.0
123
- */
124
- declare const determinant: (m: Matrix2x2) => number;
125
- declare const vectorProductLeft: {
126
- /**
127
- * Calculates the left vector product of a matrix and a vector.
128
- *
129
- * @example
130
- * ```ts
131
- * import * as Matrix2x2 from 'curvy/matrix2x2'
132
- * import * as Vector2 from 'curvy/vector2'
133
- *
134
- * const matrix = Matrix2x2.make(1, 2, 3, 4)
135
- * const vector = Vector2.make(5, 6)
136
- *
137
- * // Performs:
138
- * // x = 1 * 5 + 2 * 6 = 17
139
- * // y = 3 * 5 + 4 * 6 = 39
140
- * const result = Matrix2x2.vectorProductLeft(matrix, vector)
141
- * ```
142
- * @param m - The matrix to multiply.
143
- * @param v - The vector to multiply.
144
- * @returns The resulting vector after the left vector product.
145
- * @since 1.0.0
146
- */
147
- (m: Matrix2x2, v: Vector2): Vector2;
148
- /**
149
- * Calculates the left vector product of a matrix and a vector.
150
- *
151
- * @example
152
- * ```ts
153
- * import * as Matrix2x2 from 'curvy/matrix2x2'
154
- * import * as Vector2 from 'curvy/vector2'
155
- *
156
- * const matrix = Matrix2x2.make(1, 2, 3, 4)
157
- * const vector = Vector2.make(5, 6)
158
- *
159
- * // Performs:
160
- * // x = 1 * 5 + 2 * 6 = 17
161
- * // y = 3 * 5 + 4 * 6 = 39
162
- * const result = Matrix2x2.vectorProductLeft(vector)(matrix)
163
- * ```
164
- * @param v - The vector to multiply.
165
- * @returns A function that takes a matrix and returns the resulting vector after the left vector product.
166
- * @since 1.0.0
167
- */
168
- (v: Vector2): (m: Matrix2x2) => Vector2;
169
- };
170
- declare const vectorProductRight: {
171
- /**
172
- * Calculates the right vector product of a matrix and a vector.
173
- *
174
- * @example
175
- * ```ts
176
- * import * as Matrix2x2 from 'curvy/matrix2x2'
177
- * import * as Vector2 from 'curvy/vector2'
178
- *
179
- * const matrix = Matrix2x2.make(1, 2, 3, 4)
180
- * const vector = Vector2.make(5, 6)
181
- *
182
- * // Performs:
183
- * // x = 1 * 5 + 3 * 6 = 33
184
- * // y = 2 * 5 + 4 * 6 = 62
185
- * const result = Matrix2x2.vectorProductRight(matrix, vector)
186
- * ```
187
- * @param m - The matrix to multiply.
188
- * @param v - The vector to multiply.
189
- * @returns The resulting vector after the right vector product.
190
- * @since 1.0.0
191
- */
192
- (m: Matrix2x2, v: Vector2): Vector2;
193
- /**
194
- * Calculates the right vector product of a matrix and a vector.
195
- *
196
- * @example
197
- * ```ts
198
- * import * as Matrix2x2 from 'curvy/matrix2x2'
199
- * import * as Vector2 from 'curvy/vector2'
200
- *
201
- * const matrix = Matrix2x2.make(1, 2, 3, 4)
202
- * const vector = Vector2.make(5, 6)
203
- *
204
- * // Performs:
205
- * // x = 1 * 5 + 3 * 6 = 33
206
- * // y = 2 * 5 + 4 * 6 = 62
207
- * const result = Matrix2x2.vectorProductRight(vector)(matrix)
208
- * ```
209
- * @param v - The vector to multiply.
210
- * @returns A function that takes a matrix and returns the resulting vector after the right vector product.
211
- * @since 1.0.0
212
- */
213
- (v: Vector2): (m: Matrix2x2) => Vector2;
214
- };
215
- declare const solveSystem: {
216
- /**
217
- * Solves a system of linear equations represented by a matrix and a vector.
218
- *
219
- * @example
220
- * ```ts
221
- * import * as Matrix2x2 from 'curvy/matrix2x2'
222
- * import * as Vector2 from 'curvy/vector2'
223
- *
224
- * const matrix = Matrix2x2.make(1, 2, 3, 4)
225
- * const vector = Vector2.make(5, 6)
226
- *
227
- * // Solves the system of equations:
228
- * // 1x + 2y = 5
229
- * // 3x + 4y = 6
230
- * const result = Matrix2x2.solveSystem(matrix, vector)
231
- * ```
232
- * @param m - The matrix representing the coefficients of the system.
233
- * @param v - The vector representing the constants of the system.
234
- * @returns The solution vector.
235
- * @since 1.0.0
236
- */
237
- (m: Matrix2x2, v: Vector2): Vector2;
238
- /**
239
- * Solves a system of linear equations represented by a matrix and a vector.
240
- *
241
- * @example
242
- * ```ts
243
- * import * as Matrix2x2 from 'curvy/matrix2x2'
244
- * import * as Vector2 from 'curvy/vector2'
245
- *
246
- * const matrix = Matrix2x2.make(1, 2, 3, 4)
247
- * const vector = Vector2.make(5, 6)
248
- *
249
- * // Solves the system of equations:
250
- * // 1x + 2y = 5
251
- * // 3x + 4y = 6
252
- * const result = Matrix2x2.solveSystem(vector)(matrix)
253
- * ```
254
- * @param v - The vector representing the constants of the system.
255
- * @returns A function that takes a matrix and returns the solution vector.
256
- * @since 1.0.0
257
- */
258
- (v: Vector2): (m: Matrix2x2) => Vector2;
259
- };
260
- /**
261
- * Returns the rows of a matrix as an array of vectors.
262
- *
263
- * @param m - The matrix to convert.
264
- * @returns An array of vectors representing the rows of the matrix.
265
- * @since 1.0.0
266
- */
267
- declare const toRows: (m: Matrix2x2) => [Vector2, Vector2];
268
- /**
269
- * Returns the columns of a matrix as an array of vectors.
270
- *
271
- * @param m - The matrix to convert.
272
- * @returns An array of vectors representing the columns of the matrix.
273
- * @since 1.0.0
274
- */
275
- declare const toColumns: (m: Matrix2x2) => [Vector2, Vector2];
276
- /**
277
- * Returns the specified row of a matrix as a vector.
278
- *
279
- * @param m - The matrix to get the row from.
280
- * @param row - The row index (0 or 1).
281
- * @returns A vector representing the specified row of the matrix.
282
- * @since 1.0.0
283
- */
284
- declare const rowVector: (m: Matrix2x2, row: Matrix2x2Coordinate) => Vector2;
285
- /**
286
- * Returns the specified column of a matrix as a vector.
287
- *
288
- * @param m - The matrix to get the column from.
289
- * @param column - The column index (0 or 1).
290
- * @returns A vector representing the specified column of the matrix.
291
- * @since 1.0.0
292
- */
293
- declare const columnVector: (m: Matrix2x2, column: Matrix2x2Coordinate) => Vector2;
294
- /**
295
- * Transposes a matrix.
296
- *
297
- * @param m - The matrix to transpose.
298
- * @returns A new `Matrix2x2` instance representing the transposed matrix.
299
- * @since 1.0.0
300
- */
301
- declare const transpose: (m: Matrix2x2) => Matrix2x2;
302
- /**
303
- * Reverses the rows of a matrix.
304
- *
305
- * @param m - The matrix to reverse the rows of.
306
- * @returns A new `Matrix2x2` instance with the rows reversed.
307
- * @since 1.0.0
308
- */
309
- declare const reverseRows: (m: Matrix2x2) => Matrix2x2;
310
- /**
311
- * Reverses the columns of a matrix.
312
- *
313
- * @param m - The matrix to reverse the columns of.
314
- * @returns A new `Matrix2x2` instance with the columns reversed.
315
- * @since 1.0.0
316
- */
317
- declare const reverseColumns: (m: Matrix2x2) => Matrix2x2;
318
-
319
- export { columnVector, determinant, fromColumns, fromRows, isMatrix2x2, make, reverseColumns, reverseRows, rowVector, setColumn, setRow, solveSystem, toColumns, toRows, transpose, vectorProductLeft, vectorProductRight };
320
- export type { Matrix2x2, Matrix2x2Coordinate };
@@ -1,320 +0,0 @@
1
- import { d as TwoDimensionalIndex, e as TwoDimensionalComponent } from '../shared/curvy.Bf5TIk31.js';
2
- import { Pipeable } from '../pipe.js';
3
- import { Vector2 } from '../vector/vector2.js';
4
-
5
- declare const Matrix2x2TypeId: unique symbol;
6
- type Matrix2x2TypeId = typeof Matrix2x2TypeId;
7
-
8
- /**
9
- * A type representing the coordinate of a 2D matrix.
10
- *
11
- * @since 1.0.0
12
- */
13
- type Matrix2x2Coordinate = TwoDimensionalIndex | TwoDimensionalComponent;
14
- /**
15
- * A 2D matrix with 2 rows and 2 columns.
16
- *
17
- * All fields are readonly and immutable, and all operations create new instances.
18
- *
19
- * @since 1.0.0
20
- */
21
- interface Matrix2x2 extends Pipeable {
22
- readonly [Matrix2x2TypeId]: Matrix2x2TypeId;
23
- /**
24
- * The value in the first row and first column.
25
- */
26
- readonly m00: number;
27
- /**
28
- * The value in the first row and second column.
29
- */
30
- readonly m01: number;
31
- /**
32
- * The value in the second row and first column.
33
- */
34
- readonly m10: number;
35
- /**
36
- * The value in the second row and second column.
37
- */
38
- readonly m11: number;
39
- }
40
- /**
41
- * Checks if a value is a `Matrix2x2`.
42
- *
43
- * @param m - The value to check.
44
- * @returns `true` if the value is a `Matrix2x2`, `false` otherwise.
45
- * @since 1.0.0
46
- */
47
- declare const isMatrix2x2: (m: unknown) => m is Matrix2x2;
48
- /**
49
- * Creates a new `Matrix2x2` instance.
50
- *
51
- * @param m00 - The value in the first row and first column. Defaults to 0.
52
- * @param m01 - The value in the first row and second column. Defaults to 0.
53
- * @param m10 - The value in the second row and first column. Defaults to 0.
54
- * @param m11 - The value in the second row and second column. Defaults to 0.
55
- */
56
- declare const make: (m00?: number, m01?: number, m10?: number, m11?: number) => Matrix2x2;
57
- /**
58
- * Creates a new `Matrix2x2` instance from two vectors representing rows.
59
- *
60
- * @param v0 - The first row vector.
61
- * @param v1 - The second row vector.
62
- * @returns A new `Matrix2x2` instance.
63
- * @since 1.0.0
64
- */
65
- declare const fromRows: (v0: Vector2, v1: Vector2) => Matrix2x2;
66
- /**
67
- * Creates a new `Matrix2x2` instance from two vectors representing columns.
68
- *
69
- * @param v0 - The first column vector.
70
- * @param v1 - The second column vector.
71
- * @returns A new `Matrix2x2` instance.
72
- * @since 1.0.0
73
- */
74
- declare const fromColumns: (v0: Vector2, v1: Vector2) => Matrix2x2;
75
- declare const setRow: {
76
- /**
77
- * Sets the specified row of the matrix to the given vector.
78
- *
79
- * @param m - The matrix to modify.
80
- * @param row - The row index (0 or 1).
81
- * @param v - The vector to set the row to.
82
- * @returns A new `Matrix2x2` instance with the specified row set to the given vector.
83
- * @since 1.0.0
84
- */
85
- (m: Matrix2x2, row: Matrix2x2Coordinate, v: Vector2): Matrix2x2;
86
- /**
87
- * Sets the specified row of the matrix to the given vector.
88
- *
89
- * @param row - The row index (0 or 1).
90
- * @param v - The vector to set the row to.
91
- * @returns A function that takes a matrix and returns a new `Matrix2x2` instance with the specified row set to the given vector.
92
- * @since 1.0.0
93
- */
94
- (row: Matrix2x2Coordinate, v: Vector2): (m: Matrix2x2) => Matrix2x2;
95
- };
96
- declare const setColumn: {
97
- /**
98
- * Sets the specified column of the matrix to the given vector.
99
- *
100
- * @param m - The matrix to modify.
101
- * @param column - The column index (0 or 1).
102
- * @param v - The vector to set the column to.
103
- * @returns A new `Matrix2x2` instance with the specified column set to the given vector.
104
- * @since 1.0.0
105
- */
106
- (m: Matrix2x2, column: Matrix2x2Coordinate, v: Vector2): Matrix2x2;
107
- /**
108
- * Sets the specified column of the matrix to the given vector.
109
- *
110
- * @param column - The column index (0 or 1).
111
- * @param v - The vector to set the column to.
112
- * @returns A function that takes a matrix and returns a new `Matrix2x2` instance with the specified column set to the given vector.
113
- * @since 1.0.0
114
- */
115
- (column: Matrix2x2Coordinate, v: Vector2): (m: Matrix2x2) => Matrix2x2;
116
- };
117
- /**
118
- * Calculates the determinant of a 2D matrix.
119
- *
120
- * @param m - The matrix to calculate the determinant for.
121
- * @returns The determinant of the matrix.
122
- * @since 1.0.0
123
- */
124
- declare const determinant: (m: Matrix2x2) => number;
125
- declare const vectorProductLeft: {
126
- /**
127
- * Calculates the left vector product of a matrix and a vector.
128
- *
129
- * @example
130
- * ```ts
131
- * import * as Matrix2x2 from 'curvy/matrix2x2'
132
- * import * as Vector2 from 'curvy/vector2'
133
- *
134
- * const matrix = Matrix2x2.make(1, 2, 3, 4)
135
- * const vector = Vector2.make(5, 6)
136
- *
137
- * // Performs:
138
- * // x = 1 * 5 + 2 * 6 = 17
139
- * // y = 3 * 5 + 4 * 6 = 39
140
- * const result = Matrix2x2.vectorProductLeft(matrix, vector)
141
- * ```
142
- * @param m - The matrix to multiply.
143
- * @param v - The vector to multiply.
144
- * @returns The resulting vector after the left vector product.
145
- * @since 1.0.0
146
- */
147
- (m: Matrix2x2, v: Vector2): Vector2;
148
- /**
149
- * Calculates the left vector product of a matrix and a vector.
150
- *
151
- * @example
152
- * ```ts
153
- * import * as Matrix2x2 from 'curvy/matrix2x2'
154
- * import * as Vector2 from 'curvy/vector2'
155
- *
156
- * const matrix = Matrix2x2.make(1, 2, 3, 4)
157
- * const vector = Vector2.make(5, 6)
158
- *
159
- * // Performs:
160
- * // x = 1 * 5 + 2 * 6 = 17
161
- * // y = 3 * 5 + 4 * 6 = 39
162
- * const result = Matrix2x2.vectorProductLeft(vector)(matrix)
163
- * ```
164
- * @param v - The vector to multiply.
165
- * @returns A function that takes a matrix and returns the resulting vector after the left vector product.
166
- * @since 1.0.0
167
- */
168
- (v: Vector2): (m: Matrix2x2) => Vector2;
169
- };
170
- declare const vectorProductRight: {
171
- /**
172
- * Calculates the right vector product of a matrix and a vector.
173
- *
174
- * @example
175
- * ```ts
176
- * import * as Matrix2x2 from 'curvy/matrix2x2'
177
- * import * as Vector2 from 'curvy/vector2'
178
- *
179
- * const matrix = Matrix2x2.make(1, 2, 3, 4)
180
- * const vector = Vector2.make(5, 6)
181
- *
182
- * // Performs:
183
- * // x = 1 * 5 + 3 * 6 = 33
184
- * // y = 2 * 5 + 4 * 6 = 62
185
- * const result = Matrix2x2.vectorProductRight(matrix, vector)
186
- * ```
187
- * @param m - The matrix to multiply.
188
- * @param v - The vector to multiply.
189
- * @returns The resulting vector after the right vector product.
190
- * @since 1.0.0
191
- */
192
- (m: Matrix2x2, v: Vector2): Vector2;
193
- /**
194
- * Calculates the right vector product of a matrix and a vector.
195
- *
196
- * @example
197
- * ```ts
198
- * import * as Matrix2x2 from 'curvy/matrix2x2'
199
- * import * as Vector2 from 'curvy/vector2'
200
- *
201
- * const matrix = Matrix2x2.make(1, 2, 3, 4)
202
- * const vector = Vector2.make(5, 6)
203
- *
204
- * // Performs:
205
- * // x = 1 * 5 + 3 * 6 = 33
206
- * // y = 2 * 5 + 4 * 6 = 62
207
- * const result = Matrix2x2.vectorProductRight(vector)(matrix)
208
- * ```
209
- * @param v - The vector to multiply.
210
- * @returns A function that takes a matrix and returns the resulting vector after the right vector product.
211
- * @since 1.0.0
212
- */
213
- (v: Vector2): (m: Matrix2x2) => Vector2;
214
- };
215
- declare const solveSystem: {
216
- /**
217
- * Solves a system of linear equations represented by a matrix and a vector.
218
- *
219
- * @example
220
- * ```ts
221
- * import * as Matrix2x2 from 'curvy/matrix2x2'
222
- * import * as Vector2 from 'curvy/vector2'
223
- *
224
- * const matrix = Matrix2x2.make(1, 2, 3, 4)
225
- * const vector = Vector2.make(5, 6)
226
- *
227
- * // Solves the system of equations:
228
- * // 1x + 2y = 5
229
- * // 3x + 4y = 6
230
- * const result = Matrix2x2.solveSystem(matrix, vector)
231
- * ```
232
- * @param m - The matrix representing the coefficients of the system.
233
- * @param v - The vector representing the constants of the system.
234
- * @returns The solution vector.
235
- * @since 1.0.0
236
- */
237
- (m: Matrix2x2, v: Vector2): Vector2;
238
- /**
239
- * Solves a system of linear equations represented by a matrix and a vector.
240
- *
241
- * @example
242
- * ```ts
243
- * import * as Matrix2x2 from 'curvy/matrix2x2'
244
- * import * as Vector2 from 'curvy/vector2'
245
- *
246
- * const matrix = Matrix2x2.make(1, 2, 3, 4)
247
- * const vector = Vector2.make(5, 6)
248
- *
249
- * // Solves the system of equations:
250
- * // 1x + 2y = 5
251
- * // 3x + 4y = 6
252
- * const result = Matrix2x2.solveSystem(vector)(matrix)
253
- * ```
254
- * @param v - The vector representing the constants of the system.
255
- * @returns A function that takes a matrix and returns the solution vector.
256
- * @since 1.0.0
257
- */
258
- (v: Vector2): (m: Matrix2x2) => Vector2;
259
- };
260
- /**
261
- * Returns the rows of a matrix as an array of vectors.
262
- *
263
- * @param m - The matrix to convert.
264
- * @returns An array of vectors representing the rows of the matrix.
265
- * @since 1.0.0
266
- */
267
- declare const toRows: (m: Matrix2x2) => [Vector2, Vector2];
268
- /**
269
- * Returns the columns of a matrix as an array of vectors.
270
- *
271
- * @param m - The matrix to convert.
272
- * @returns An array of vectors representing the columns of the matrix.
273
- * @since 1.0.0
274
- */
275
- declare const toColumns: (m: Matrix2x2) => [Vector2, Vector2];
276
- /**
277
- * Returns the specified row of a matrix as a vector.
278
- *
279
- * @param m - The matrix to get the row from.
280
- * @param row - The row index (0 or 1).
281
- * @returns A vector representing the specified row of the matrix.
282
- * @since 1.0.0
283
- */
284
- declare const rowVector: (m: Matrix2x2, row: Matrix2x2Coordinate) => Vector2;
285
- /**
286
- * Returns the specified column of a matrix as a vector.
287
- *
288
- * @param m - The matrix to get the column from.
289
- * @param column - The column index (0 or 1).
290
- * @returns A vector representing the specified column of the matrix.
291
- * @since 1.0.0
292
- */
293
- declare const columnVector: (m: Matrix2x2, column: Matrix2x2Coordinate) => Vector2;
294
- /**
295
- * Transposes a matrix.
296
- *
297
- * @param m - The matrix to transpose.
298
- * @returns A new `Matrix2x2` instance representing the transposed matrix.
299
- * @since 1.0.0
300
- */
301
- declare const transpose: (m: Matrix2x2) => Matrix2x2;
302
- /**
303
- * Reverses the rows of a matrix.
304
- *
305
- * @param m - The matrix to reverse the rows of.
306
- * @returns A new `Matrix2x2` instance with the rows reversed.
307
- * @since 1.0.0
308
- */
309
- declare const reverseRows: (m: Matrix2x2) => Matrix2x2;
310
- /**
311
- * Reverses the columns of a matrix.
312
- *
313
- * @param m - The matrix to reverse the columns of.
314
- * @returns A new `Matrix2x2` instance with the columns reversed.
315
- * @since 1.0.0
316
- */
317
- declare const reverseColumns: (m: Matrix2x2) => Matrix2x2;
318
-
319
- export { columnVector, determinant, fromColumns, fromRows, isMatrix2x2, make, reverseColumns, reverseRows, rowVector, setColumn, setRow, solveSystem, toColumns, toRows, transpose, vectorProductLeft, vectorProductRight };
320
- export type { Matrix2x2, Matrix2x2Coordinate };
@@ -1,25 +0,0 @@
1
- import { i as isMatrix2x2$1, m as make$1, f as fromRows$1, a as fromColumns$1, s as setRow$1, b as setColumn$1, d as determinant$1, v as vectorProductLeft$1, c as vectorProductRight$1, e as solveSystem$1, t as toRows$1, g as toColumns$1, r as rowVector$1, h as columnVector$1, j as transpose$1, k as reverseRows$1, l as reverseColumns$1 } from '../shared/curvy.BkkW8Tx9.mjs';
2
- import '../utils.mjs';
3
- import '../pipe.mjs';
4
- import '../shared/curvy.DJ4xO0al.mjs';
5
-
6
- const isMatrix2x2 = isMatrix2x2$1;
7
- const make = make$1;
8
- const fromRows = fromRows$1;
9
- const fromColumns = fromColumns$1;
10
- const setRow = setRow$1;
11
- const setColumn = setColumn$1;
12
- const determinant = determinant$1;
13
- const vectorProductLeft = vectorProductLeft$1;
14
- const vectorProductRight = vectorProductRight$1;
15
- const solveSystem = solveSystem$1;
16
- const toRows = toRows$1;
17
- const toColumns = toColumns$1;
18
- const rowVector = rowVector$1;
19
- const columnVector = columnVector$1;
20
- const transpose = transpose$1;
21
- const reverseRows = reverseRows$1;
22
- const reverseColumns = reverseColumns$1;
23
-
24
- export { columnVector, determinant, fromColumns, fromRows, isMatrix2x2, make, reverseColumns, reverseRows, rowVector, setColumn, setRow, solveSystem, toColumns, toRows, transpose, vectorProductLeft, vectorProductRight };
25
- //# sourceMappingURL=matrix2x2.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"matrix2x2.mjs","sources":["../../src/matrix/matrix2x2.ts"],"sourcesContent":["import type { TwoDimensionalComponent, TwoDimensionalIndex } from '../dimensions'\nimport type { Pipeable } from '../pipe'\nimport type { Vector2 } from '../vector/vector2'\nimport * as internal from './matrix2x2.internal'\nimport type { Matrix2x2TypeId } from './matrix2x2.internal'\n\n/**\n * A type representing the coordinate of a 2D matrix.\n *\n * @since 1.0.0\n */\nexport type Matrix2x2Coordinate = TwoDimensionalIndex | TwoDimensionalComponent\n\n/**\n * A 2D matrix with 2 rows and 2 columns.\n *\n * All fields are readonly and immutable, and all operations create new instances.\n *\n * @since 1.0.0\n */\nexport interface Matrix2x2 extends Pipeable {\n readonly [Matrix2x2TypeId]: Matrix2x2TypeId\n\n /**\n * The value in the first row and first column.\n */\n readonly m00: number\n /**\n * The value in the first row and second column.\n */\n readonly m01: number\n /**\n * The value in the second row and first column.\n */\n readonly m10: number\n /**\n * The value in the second row and second column.\n */\n readonly m11: number\n}\n\n/**\n * Checks if a value is a `Matrix2x2`.\n *\n * @param m - The value to check.\n * @returns `true` if the value is a `Matrix2x2`, `false` otherwise.\n * @since 1.0.0\n */\nexport const isMatrix2x2: (m: unknown) => m is Matrix2x2 = internal.isMatrix2x2\n\n/**\n * Creates a new `Matrix2x2` instance.\n *\n * @param m00 - The value in the first row and first column. Defaults to 0.\n * @param m01 - The value in the first row and second column. Defaults to 0.\n * @param m10 - The value in the second row and first column. Defaults to 0.\n * @param m11 - The value in the second row and second column. Defaults to 0.\n */\nexport const make: (m00?: number, m01?: number, m10?: number, m11?: number) => Matrix2x2 =\n internal.make\n\n/**\n * Creates a new `Matrix2x2` instance from two vectors representing rows.\n *\n * @param v0 - The first row vector.\n * @param v1 - The second row vector.\n * @returns A new `Matrix2x2` instance.\n * @since 1.0.0\n */\nexport const fromRows: (v0: Vector2, v1: Vector2) => Matrix2x2 = internal.fromRows\n\n/**\n * Creates a new `Matrix2x2` instance from two vectors representing columns.\n *\n * @param v0 - The first column vector.\n * @param v1 - The second column vector.\n * @returns A new `Matrix2x2` instance.\n * @since 1.0.0\n */\nexport const fromColumns: (v0: Vector2, v1: Vector2) => Matrix2x2 = internal.fromColumns\n\nexport const setRow: {\n /**\n * Sets the specified row of the matrix to the given vector.\n *\n * @param m - The matrix to modify.\n * @param row - The row index (0 or 1).\n * @param v - The vector to set the row to.\n * @returns A new `Matrix2x2` instance with the specified row set to the given vector.\n * @since 1.0.0\n */\n (m: Matrix2x2, row: Matrix2x2Coordinate, v: Vector2): Matrix2x2\n /**\n * Sets the specified row of the matrix to the given vector.\n *\n * @param row - The row index (0 or 1).\n * @param v - The vector to set the row to.\n * @returns A function that takes a matrix and returns a new `Matrix2x2` instance with the specified row set to the given vector.\n * @since 1.0.0\n */\n (row: Matrix2x2Coordinate, v: Vector2): (m: Matrix2x2) => Matrix2x2\n} = internal.setRow\n\nexport const setColumn: {\n /**\n * Sets the specified column of the matrix to the given vector.\n *\n * @param m - The matrix to modify.\n * @param column - The column index (0 or 1).\n * @param v - The vector to set the column to.\n * @returns A new `Matrix2x2` instance with the specified column set to the given vector.\n * @since 1.0.0\n */\n (m: Matrix2x2, column: Matrix2x2Coordinate, v: Vector2): Matrix2x2\n /**\n * Sets the specified column of the matrix to the given vector.\n *\n * @param column - The column index (0 or 1).\n * @param v - The vector to set the column to.\n * @returns A function that takes a matrix and returns a new `Matrix2x2` instance with the specified column set to the given vector.\n * @since 1.0.0\n */\n (column: Matrix2x2Coordinate, v: Vector2): (m: Matrix2x2) => Matrix2x2\n} = internal.setColumn\n\n/**\n * Calculates the determinant of a 2D matrix.\n *\n * @param m - The matrix to calculate the determinant for.\n * @returns The determinant of the matrix.\n * @since 1.0.0\n */\nexport const determinant: (m: Matrix2x2) => number = internal.determinant\n\nexport const vectorProductLeft: {\n /**\n * Calculates the left vector product of a matrix and a vector.\n *\n * @example\n * ```ts\n * import * as Matrix2x2 from 'curvy/matrix2x2'\n * import * as Vector2 from 'curvy/vector2'\n *\n * const matrix = Matrix2x2.make(1, 2, 3, 4)\n * const vector = Vector2.make(5, 6)\n *\n * // Performs:\n * // x = 1 * 5 + 2 * 6 = 17\n * // y = 3 * 5 + 4 * 6 = 39\n * const result = Matrix2x2.vectorProductLeft(matrix, vector)\n * ```\n * @param m - The matrix to multiply.\n * @param v - The vector to multiply.\n * @returns The resulting vector after the left vector product.\n * @since 1.0.0\n */\n (m: Matrix2x2, v: Vector2): Vector2\n /**\n * Calculates the left vector product of a matrix and a vector.\n *\n * @example\n * ```ts\n * import * as Matrix2x2 from 'curvy/matrix2x2'\n * import * as Vector2 from 'curvy/vector2'\n *\n * const matrix = Matrix2x2.make(1, 2, 3, 4)\n * const vector = Vector2.make(5, 6)\n *\n * // Performs:\n * // x = 1 * 5 + 2 * 6 = 17\n * // y = 3 * 5 + 4 * 6 = 39\n * const result = Matrix2x2.vectorProductLeft(vector)(matrix)\n * ```\n * @param v - The vector to multiply.\n * @returns A function that takes a matrix and returns the resulting vector after the left vector product.\n * @since 1.0.0\n */\n (v: Vector2): (m: Matrix2x2) => Vector2\n} = internal.vectorProductLeft\n\nexport const vectorProductRight: {\n /**\n * Calculates the right vector product of a matrix and a vector.\n *\n * @example\n * ```ts\n * import * as Matrix2x2 from 'curvy/matrix2x2'\n * import * as Vector2 from 'curvy/vector2'\n *\n * const matrix = Matrix2x2.make(1, 2, 3, 4)\n * const vector = Vector2.make(5, 6)\n *\n * // Performs:\n * // x = 1 * 5 + 3 * 6 = 33\n * // y = 2 * 5 + 4 * 6 = 62\n * const result = Matrix2x2.vectorProductRight(matrix, vector)\n * ```\n * @param m - The matrix to multiply.\n * @param v - The vector to multiply.\n * @returns The resulting vector after the right vector product.\n * @since 1.0.0\n */\n (m: Matrix2x2, v: Vector2): Vector2\n /**\n * Calculates the right vector product of a matrix and a vector.\n *\n * @example\n * ```ts\n * import * as Matrix2x2 from 'curvy/matrix2x2'\n * import * as Vector2 from 'curvy/vector2'\n *\n * const matrix = Matrix2x2.make(1, 2, 3, 4)\n * const vector = Vector2.make(5, 6)\n *\n * // Performs:\n * // x = 1 * 5 + 3 * 6 = 33\n * // y = 2 * 5 + 4 * 6 = 62\n * const result = Matrix2x2.vectorProductRight(vector)(matrix)\n * ```\n * @param v - The vector to multiply.\n * @returns A function that takes a matrix and returns the resulting vector after the right vector product.\n * @since 1.0.0\n */\n (v: Vector2): (m: Matrix2x2) => Vector2\n} = internal.vectorProductRight\n\nexport const solveSystem: {\n /**\n * Solves a system of linear equations represented by a matrix and a vector.\n *\n * @example\n * ```ts\n * import * as Matrix2x2 from 'curvy/matrix2x2'\n * import * as Vector2 from 'curvy/vector2'\n *\n * const matrix = Matrix2x2.make(1, 2, 3, 4)\n * const vector = Vector2.make(5, 6)\n *\n * // Solves the system of equations:\n * // 1x + 2y = 5\n * // 3x + 4y = 6\n * const result = Matrix2x2.solveSystem(matrix, vector)\n * ```\n * @param m - The matrix representing the coefficients of the system.\n * @param v - The vector representing the constants of the system.\n * @returns The solution vector.\n * @since 1.0.0\n */\n (m: Matrix2x2, v: Vector2): Vector2\n /**\n * Solves a system of linear equations represented by a matrix and a vector.\n *\n * @example\n * ```ts\n * import * as Matrix2x2 from 'curvy/matrix2x2'\n * import * as Vector2 from 'curvy/vector2'\n *\n * const matrix = Matrix2x2.make(1, 2, 3, 4)\n * const vector = Vector2.make(5, 6)\n *\n * // Solves the system of equations:\n * // 1x + 2y = 5\n * // 3x + 4y = 6\n * const result = Matrix2x2.solveSystem(vector)(matrix)\n * ```\n * @param v - The vector representing the constants of the system.\n * @returns A function that takes a matrix and returns the solution vector.\n * @since 1.0.0\n */\n (v: Vector2): (m: Matrix2x2) => Vector2\n} = internal.solveSystem\n\n/**\n * Returns the rows of a matrix as an array of vectors.\n *\n * @param m - The matrix to convert.\n * @returns An array of vectors representing the rows of the matrix.\n * @since 1.0.0\n */\nexport const toRows: (m: Matrix2x2) => [Vector2, Vector2] = internal.toRows\n\n/**\n * Returns the columns of a matrix as an array of vectors.\n *\n * @param m - The matrix to convert.\n * @returns An array of vectors representing the columns of the matrix.\n * @since 1.0.0\n */\nexport const toColumns: (m: Matrix2x2) => [Vector2, Vector2] = internal.toColumns\n\n/**\n * Returns the specified row of a matrix as a vector.\n *\n * @param m - The matrix to get the row from.\n * @param row - The row index (0 or 1).\n * @returns A vector representing the specified row of the matrix.\n * @since 1.0.0\n */\nexport const rowVector: (m: Matrix2x2, row: Matrix2x2Coordinate) => Vector2 = internal.rowVector\n\n/**\n * Returns the specified column of a matrix as a vector.\n *\n * @param m - The matrix to get the column from.\n * @param column - The column index (0 or 1).\n * @returns A vector representing the specified column of the matrix.\n * @since 1.0.0\n */\nexport const columnVector: (m: Matrix2x2, column: Matrix2x2Coordinate) => Vector2 =\n internal.columnVector\n\n/**\n * Transposes a matrix.\n *\n * @param m - The matrix to transpose.\n * @returns A new `Matrix2x2` instance representing the transposed matrix.\n * @since 1.0.0\n */\nexport const transpose: (m: Matrix2x2) => Matrix2x2 = internal.transpose\n\n/**\n * Reverses the rows of a matrix.\n *\n * @param m - The matrix to reverse the rows of.\n * @returns A new `Matrix2x2` instance with the rows reversed.\n * @since 1.0.0\n */\nexport const reverseRows: (m: Matrix2x2) => Matrix2x2 = internal.reverseRows\n\n/**\n * Reverses the columns of a matrix.\n *\n * @param m - The matrix to reverse the columns of.\n * @returns A new `Matrix2x2` instance with the columns reversed.\n * @since 1.0.0\n */\nexport const reverseColumns: (m: Matrix2x2) => Matrix2x2 = internal.reverseColumns\n"],"names":["internal.isMatrix2x2","internal.make","internal.fromRows","internal.fromColumns","internal.setRow","internal.setColumn","internal.determinant","internal.vectorProductLeft","internal.vectorProductRight","internal.solveSystem","internal.toRows","internal.toColumns","internal.rowVector","internal.columnVector","internal.transpose","internal.reverseRows","internal.reverseColumns"],"mappings":";;;;;AAgDO,MAAM,cAA8CA;AAUpD,MAAM,OACXC;AAUK,MAAM,WAAoDC;AAU1D,MAAM,cAAuDC;AAE7D,MAAM,SAoBTC;AAEG,MAAM,YAoBTC;AASG,MAAM,cAAwCC;AAE9C,MAAM,oBA4CTC;AAEG,MAAM,qBA4CTC;AAEG,MAAM,cA4CTC;AASG,MAAM,SAA+CC;AASrD,MAAM,YAAkDC;AAUxD,MAAM,YAAiEC;AAUvE,MAAM,eACXC;AASK,MAAM,YAAyCC;AAS/C,MAAM,cAA2CC;AASjD,MAAM,iBAA8CC;;;;"}