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,88 @@
1
+ import { o as Vector4 } from "../shared/vector2-TV0UnlxY.mjs";
2
+ import { t as Matrix4x4 } from "../shared/matrix4x4-Bt_DBlP0.mjs";
3
+ import { t as CubicPolynomial } from "../shared/cubic-Dfn6DB02.mjs";
4
+
5
+ //#region src/characteristic/characteristic.d.ts
6
+ declare namespace characteristic_d_exports {
7
+ export { apply, cubicBasisSpline, cubicBezier, cubicCardinal, cubicCatmullRom, cubicHermite };
8
+ }
9
+ /**
10
+ * The cubic Bézier characteristic matrix.
11
+ *
12
+ * Maps Bernstein-basis control points `(P₀, P₁, P₂, P₃)` to monomial cubic
13
+ * coefficients `(c₀, c₁, c₂, c₃)` for `c₀ + c₁·t + c₂·t² + c₃·t³`. The matrix
14
+ * IS the Bézier spline family — combined with control points (via {@link apply}),
15
+ * it produces the cubic polynomial that parameterizes the curve.
16
+ *
17
+ * @since 2.1.0
18
+ */
19
+ declare const cubicBezier: Matrix4x4;
20
+ /**
21
+ * The cubic Hermite characteristic matrix.
22
+ *
23
+ * Maps Hermite control data `(P₀, V₀, P₁, V₁)` — two endpoints and two
24
+ * tangent vectors — to monomial cubic coefficients.
25
+ *
26
+ * @since 2.1.0
27
+ */
28
+ declare const cubicHermite: Matrix4x4;
29
+ /**
30
+ * The uniform cubic B-spline (basis spline) characteristic matrix.
31
+ *
32
+ * Maps a window of four control points to the monomial cubic coefficients
33
+ * of one segment of the corresponding uniform cubic B-spline. Stride-1
34
+ * application produces a C² piecewise spline; the curve does not generally
35
+ * pass through the control points.
36
+ *
37
+ * @since 2.1.0
38
+ */
39
+ declare const cubicBasisSpline: Matrix4x4;
40
+ /**
41
+ * The cubic Cardinal spline characteristic matrix, parameterized by tension.
42
+ *
43
+ * Maps four control points to the monomial cubic coefficients of one
44
+ * Cardinal segment. The tension `s` controls how tightly the curve hugs
45
+ * the control points: `s = 0` produces straight-line segments between
46
+ * adjacent points, `s = 0.5` is the Catmull-Rom variant (see
47
+ * {@link cubicCatmullRom}), and higher values produce looser, more curved
48
+ * shapes.
49
+ *
50
+ * Cached per tension value — repeated calls with the same tension return
51
+ * the same matrix instance.
52
+ *
53
+ * @param tension - The tension parameter.
54
+ * @returns The characteristic matrix for that tension.
55
+ * @since 2.1.0
56
+ */
57
+ declare const cubicCardinal: (tension: number) => Matrix4x4;
58
+ /**
59
+ * The cubic Catmull-Rom characteristic matrix — Cardinal with tension `0.5`.
60
+ * The most common Cardinal-family variant; reused widely enough to deserve
61
+ * a constant.
62
+ *
63
+ * @since 2.1.0
64
+ */
65
+ declare const cubicCatmullRom: Matrix4x4;
66
+ /**
67
+ * Applies a characteristic matrix to N channels of control values, producing
68
+ * N cubic polynomials in monomial form.
69
+ *
70
+ * Each channel is a `Vector4` packing one axis's values across the four
71
+ * control points: `(v₀, v₁, v₂, v₃)`. The result tuple has the same arity
72
+ * as the input.
73
+ *
74
+ * The polynomial 2D spline pipeline applies this with two channels (x, y);
75
+ * the rational 2D pipeline uses three (x, y, w) where `w` is the projective
76
+ * denominator. Higher channel counts generalize to 3D, rational 3D, and
77
+ * beyond — the characteristic matrix doesn't care about the geometric
78
+ * domain, only about how to combine four samples per channel.
79
+ *
80
+ * @param matrix - The characteristic matrix of the spline family.
81
+ * @param channels - One `Vector4` per output polynomial, packing the four control values for that channel.
82
+ * @returns A tuple of cubic polynomials, one per input channel.
83
+ * @since 2.1.0
84
+ */
85
+ declare const apply: <const Channels extends ReadonlyArray<Vector4>>(matrix: Matrix4x4, ...channels: Channels) => { readonly [K in keyof Channels]: CubicPolynomial };
86
+ //#endregion
87
+ export { characteristic_d_exports as Characteristic };
88
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1,2 @@
1
+ import { n as characteristic_exports } from "../shared/characteristic-BGRxcxUH.mjs";
2
+ export { characteristic_exports as Characteristic };
@@ -0,0 +1,2 @@
1
+ import { c as linear2d_d_exports, i as cubic2d_d_exports, n as rationalCubic2d_d_exports, o as quadratic2d_d_exports } from "../shared/rationalCubic2d-BPLohNuI.mjs";
2
+ export { cubic2d_d_exports as CubicCurve2d, linear2d_d_exports as LinearCurve2d, quadratic2d_d_exports as QuadraticCurve2d, rationalCubic2d_d_exports as RationalCubicCurve2d };
@@ -0,0 +1,2 @@
1
+ import { a as cubic2d_exports, d as quadratic2d_exports, m as linear2d_exports, r as rationalCubic2d_exports } from "../shared/rationalCubic2d-CP4oGpnk.mjs";
2
+ export { cubic2d_exports as CubicCurve2d, linear2d_exports as LinearCurve2d, quadratic2d_exports as QuadraticCurve2d, rationalCubic2d_exports as RationalCubicCurve2d };
@@ -0,0 +1,2 @@
1
+ import { n as interval_d_exports } from "../shared/interval-hQDiKqj0.mjs";
2
+ export { interval_d_exports as Interval };
@@ -0,0 +1,2 @@
1
+ import { a as interval_exports } from "../shared/interval-CCEqzPgA.mjs";
2
+ export { interval_exports as Interval };
@@ -0,0 +1,2 @@
1
+ import { i as matrix2x2_d_exports, n as matrix4x4_d_exports, r as matrix3x3_d_exports } from "../shared/matrix4x4-Bt_DBlP0.mjs";
2
+ export { matrix2x2_d_exports as Matrix2x2, matrix3x3_d_exports as Matrix3x3, matrix4x4_d_exports as Matrix4x4 };
@@ -0,0 +1,267 @@
1
+ import { t as __exportAll } from "../shared/chunk-25Hzd3z8.mjs";
2
+ import { A as isMatrix2x2$1, B as transpose$2, C as vectorProductLeft$3, D as equals$2, E as determinant$2, F as setColumn$2, H as vectorProductRight$2, I as setRow$2, L as solveSystem$2, M as reverseColumns$2, N as reverseRows$2, O as fromColumns$2, P as rowVector$2, R as toColumns$2, S as transpose$3, T as columnVector$2, V as vectorProductLeft$2, _ as setColumn$3, b as toColumns$3, c as equals$3, d as isMatrix3x3$1, f as make$3, g as rowVector$3, h as reverseRows$3, j as make$2, k as fromRows$2, l as fromColumns$3, m as reverseColumns$3, o as columnVector$3, p as minor$1, r as matrix4x4_exports, s as determinant$3, u as fromRows$3, v as setRow$3, w as vectorProductRight$3, x as toRows$3, y as solveSystem$3, z as toRows$2 } from "../shared/matrix4x4-Ck2WROK-.mjs";
3
+ //#region src/matrix/matrix2x2.ts
4
+ var matrix2x2_exports = /* @__PURE__ */ __exportAll({
5
+ columnVector: () => columnVector$1,
6
+ determinant: () => determinant$1,
7
+ equals: () => equals$1,
8
+ fromColumns: () => fromColumns$1,
9
+ fromRows: () => fromRows$1,
10
+ isMatrix2x2: () => isMatrix2x2,
11
+ make: () => make$1,
12
+ reverseColumns: () => reverseColumns$1,
13
+ reverseRows: () => reverseRows$1,
14
+ rowVector: () => rowVector$1,
15
+ setColumn: () => setColumn$1,
16
+ setRow: () => setRow$1,
17
+ solveSystem: () => solveSystem$1,
18
+ toColumns: () => toColumns$1,
19
+ toRows: () => toRows$1,
20
+ transpose: () => transpose$1,
21
+ vectorProductLeft: () => vectorProductLeft$1,
22
+ vectorProductRight: () => vectorProductRight$1
23
+ });
24
+ /**
25
+ * Checks if a value is a `Matrix2x2`.
26
+ *
27
+ * @param m - The value to check.
28
+ * @returns `true` if the value is a `Matrix2x2`, `false` otherwise.
29
+ * @since 1.0.0
30
+ */
31
+ const isMatrix2x2 = isMatrix2x2$1;
32
+ const equals$1 = equals$2;
33
+ /**
34
+ * Creates a new `Matrix2x2` instance.
35
+ *
36
+ * @param m00 - The value in the first row and first column. Defaults to 0.
37
+ * @param m01 - The value in the first row and second column. Defaults to 0.
38
+ * @param m10 - The value in the second row and first column. Defaults to 0.
39
+ * @param m11 - The value in the second row and second column. Defaults to 0.
40
+ */
41
+ const make$1 = make$2;
42
+ /**
43
+ * Creates a new `Matrix2x2` instance from two vectors representing rows.
44
+ *
45
+ * @param v0 - The first row vector.
46
+ * @param v1 - The second row vector.
47
+ * @returns A new `Matrix2x2` instance.
48
+ * @since 1.0.0
49
+ */
50
+ const fromRows$1 = fromRows$2;
51
+ /**
52
+ * Creates a new `Matrix2x2` instance from two vectors representing columns.
53
+ *
54
+ * @param v0 - The first column vector.
55
+ * @param v1 - The second column vector.
56
+ * @returns A new `Matrix2x2` instance.
57
+ * @since 1.0.0
58
+ */
59
+ const fromColumns$1 = fromColumns$2;
60
+ const setRow$1 = setRow$2;
61
+ const setColumn$1 = setColumn$2;
62
+ /**
63
+ * Calculates the determinant of a 2D matrix.
64
+ *
65
+ * @param m - The matrix to calculate the determinant for.
66
+ * @returns The determinant of the matrix.
67
+ * @since 1.0.0
68
+ */
69
+ const determinant$1 = determinant$2;
70
+ const vectorProductLeft$1 = vectorProductLeft$2;
71
+ const vectorProductRight$1 = vectorProductRight$2;
72
+ const solveSystem$1 = solveSystem$2;
73
+ /**
74
+ * Returns the rows of a matrix as an array of vectors.
75
+ *
76
+ * @param m - The matrix to convert.
77
+ * @returns An array of vectors representing the rows of the matrix.
78
+ * @since 1.0.0
79
+ */
80
+ const toRows$1 = toRows$2;
81
+ /**
82
+ * Returns the columns of a matrix as an array of vectors.
83
+ *
84
+ * @param m - The matrix to convert.
85
+ * @returns An array of vectors representing the columns of the matrix.
86
+ * @since 1.0.0
87
+ */
88
+ const toColumns$1 = toColumns$2;
89
+ /**
90
+ * Returns the specified row of a matrix as a vector.
91
+ *
92
+ * @param m - The matrix to get the row from.
93
+ * @param row - The row index (0 or 1).
94
+ * @returns A vector representing the specified row of the matrix.
95
+ * @since 1.0.0
96
+ */
97
+ const rowVector$1 = rowVector$2;
98
+ /**
99
+ * Returns the specified column of a matrix as a vector.
100
+ *
101
+ * @param m - The matrix to get the column from.
102
+ * @param column - The column index (0 or 1).
103
+ * @returns A vector representing the specified column of the matrix.
104
+ * @since 1.0.0
105
+ */
106
+ const columnVector$1 = columnVector$2;
107
+ /**
108
+ * Transposes a matrix.
109
+ *
110
+ * @param m - The matrix to transpose.
111
+ * @returns A new `Matrix2x2` instance representing the transposed matrix.
112
+ * @since 1.0.0
113
+ */
114
+ const transpose$1 = transpose$2;
115
+ /**
116
+ * Reverses the rows of a matrix.
117
+ *
118
+ * @param m - The matrix to reverse the rows of.
119
+ * @returns A new `Matrix2x2` instance with the rows reversed.
120
+ * @since 1.0.0
121
+ */
122
+ const reverseRows$1 = reverseRows$2;
123
+ /**
124
+ * Reverses the columns of a matrix.
125
+ *
126
+ * @param m - The matrix to reverse the columns of.
127
+ * @returns A new `Matrix2x2` instance with the columns reversed.
128
+ * @since 1.0.0
129
+ */
130
+ const reverseColumns$1 = reverseColumns$2;
131
+ //#endregion
132
+ //#region src/matrix/matrix3x3.ts
133
+ var matrix3x3_exports = /* @__PURE__ */ __exportAll({
134
+ columnVector: () => columnVector,
135
+ determinant: () => determinant,
136
+ equals: () => equals,
137
+ fromColumns: () => fromColumns,
138
+ fromRows: () => fromRows,
139
+ isMatrix3x3: () => isMatrix3x3,
140
+ make: () => make,
141
+ minor: () => minor,
142
+ reverseColumns: () => reverseColumns,
143
+ reverseRows: () => reverseRows,
144
+ rowVector: () => rowVector,
145
+ setColumn: () => setColumn,
146
+ setRow: () => setRow,
147
+ solveSystem: () => solveSystem,
148
+ toColumns: () => toColumns,
149
+ toRows: () => toRows,
150
+ transpose: () => transpose,
151
+ vectorProductLeft: () => vectorProductLeft,
152
+ vectorProductRight: () => vectorProductRight
153
+ });
154
+ /**
155
+ * Checks if a value is a `Matrix3x3`.
156
+ *
157
+ * @param m - The value to check.
158
+ * @returns `true` if the value is a `Matrix3x3`, `false` otherwise.
159
+ * @since 1.0.0
160
+ */
161
+ const isMatrix3x3 = isMatrix3x3$1;
162
+ const equals = equals$3;
163
+ /**
164
+ * Creates a new `Matrix3x3` instance.
165
+ *
166
+ * @param m00 - The value of the first row and first column.
167
+ * @param m01 - The value of the first row and second column.
168
+ * @param m02 - The value of the first row and third column.
169
+ * @param m10 - The value of the second row and first column.
170
+ * @param m11 - The value of the second row and second column.
171
+ * @param m12 - The value of the second row and third column.
172
+ * @param m20 - The value of the third row and first column.
173
+ * @param m21 - The value of the third row and second column.
174
+ * @param m22 - The value of the third row and third column.
175
+ * @returns A new `Matrix3x3` instance.
176
+ * @since 1.0.0
177
+ */
178
+ const make = make$3;
179
+ /**
180
+ * Creates a new `Matrix3x3` instance from three row vectors.
181
+ *
182
+ * @param v0 - The first row vector.
183
+ * @param v1 - The second row vector.
184
+ * @param v2 - The third row vector.
185
+ * @returns A new `Matrix3x3` instance.
186
+ * @since 1.0.0
187
+ */
188
+ const fromRows = fromRows$3;
189
+ /**
190
+ * Creates a new `Matrix3x3` instance from three column vectors.
191
+ *
192
+ * @param v0 - The first column vector.
193
+ * @param v1 - The second column vector.
194
+ * @param v2 - The third column vector.
195
+ * @returns A new `Matrix3x3` instance.
196
+ * @since 1.0.0
197
+ */
198
+ const fromColumns = fromColumns$3;
199
+ const setRow = setRow$3;
200
+ const setColumn = setColumn$3;
201
+ /**
202
+ * Calculates the determinant of a 3x3 matrix.
203
+ *
204
+ * @param m - The matrix to calculate the determinant of.
205
+ * @returns The determinant of the matrix.
206
+ * @since 1.0.0
207
+ */
208
+ const determinant = determinant$3;
209
+ /**
210
+ * Calculates the minor of a 3x3 matrix.
211
+ *
212
+ * @param m - The matrix to calculate the minor of.
213
+ * @param row - The row index of the element to calculate the minor for.
214
+ * @param column - The column index of the element to calculate the minor for.
215
+ * @returns The minor of the matrix at the specified row and column.
216
+ * @since 1.0.0
217
+ */
218
+ const minor = minor$1;
219
+ const vectorProductLeft = vectorProductLeft$3;
220
+ const vectorProductRight = vectorProductRight$3;
221
+ const solveSystem = solveSystem$3;
222
+ /**
223
+ * Returns the rows of a `Matrix3x3` as an array of vectors.
224
+ *
225
+ * @param m - The matrix to get the rows from.
226
+ * @returns An array of vectors representing the rows of the matrix.
227
+ * @since 1.0.0
228
+ */
229
+ const toRows = toRows$3;
230
+ /**
231
+ * Returns the columns of a `Matrix3x3` as an array of vectors.
232
+ *
233
+ * @param m - The matrix to get the columns from.
234
+ * @returns An array of vectors representing the columns of the matrix.
235
+ * @since 1.0.0
236
+ */
237
+ const toColumns = toColumns$3;
238
+ const rowVector = rowVector$3;
239
+ const columnVector = columnVector$3;
240
+ /**
241
+ * Transposes a `Matrix3x3`.
242
+ *
243
+ * @param m - The matrix to transpose.
244
+ * @returns A new `Matrix3x3` instance that is the transpose of the input matrix.
245
+ * @since 1.0.0
246
+ */
247
+ const transpose = transpose$3;
248
+ /**
249
+ * Reverses the rows of a `Matrix3x3`.
250
+ *
251
+ * @param m - The matrix to reverse the rows of.
252
+ * @returns A new `Matrix3x3` instance with the rows reversed.
253
+ * @since 1.0.0
254
+ */
255
+ const reverseRows = reverseRows$3;
256
+ /**
257
+ * Reverses the columns of a `Matrix3x3`.
258
+ *
259
+ * @param m - The matrix to reverse the columns of.
260
+ * @returns A new `Matrix3x3` instance with the columns reversed.
261
+ * @since 1.0.0
262
+ */
263
+ const reverseColumns = reverseColumns$3;
264
+ //#endregion
265
+ export { matrix2x2_exports as Matrix2x2, matrix3x3_exports as Matrix3x3, matrix4x4_exports as Matrix4x4 };
266
+
267
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":["internal.isMatrix2x2","equals","internal.equals","make","internal.make","fromRows","internal.fromRows","fromColumns","internal.fromColumns","setRow","internal.setRow","setColumn","internal.setColumn","determinant","internal.determinant","vectorProductLeft","internal.vectorProductLeft","vectorProductRight","internal.vectorProductRight","solveSystem","internal.solveSystem","toRows","internal.toRows","toColumns","internal.toColumns","rowVector","internal.rowVector","columnVector","internal.columnVector","transpose","internal.transpose","reverseRows","internal.reverseRows","reverseColumns","internal.reverseColumns","internal.isMatrix3x3","internal.equals","internal.make","internal.fromRows","internal.fromColumns","internal.setRow","internal.setColumn","internal.determinant","internal.minor","internal.vectorProductLeft","internal.vectorProductRight","internal.solveSystem","internal.toRows","internal.toColumns","internal.rowVector","internal.columnVector","internal.transpose","internal.reverseRows","internal.reverseColumns"],"sources":["../../src/matrix/matrix2x2.ts","../../src/matrix/matrix3x3.ts"],"sourcesContent":["import type { TwoDimensionalComponent, TwoDimensionalIndex } from '../dimensions'\nimport type { Pipeable } from '../utils'\nimport type { Vector2 } from '../vector/vector2'\nimport type { Matrix2x2TypeId } from './matrix2x2.internal'\nimport * as internal 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\nexport const equals: {\n /**\n * Checks if two `Matrix2x2` instances are approximately equal within the\n * default absolute tolerance ({@link EPSILON}).\n *\n * @param a - The first matrix.\n * @param b - The second matrix.\n * @returns `true` when each pair of components is within tolerance.\n * @since 1.1.0\n */\n (a: Matrix2x2, b: Matrix2x2): boolean\n /**\n * Checks if two `Matrix2x2` instances are approximately equal within the\n * default absolute tolerance ({@link EPSILON}).\n *\n * @param b - The second matrix.\n * @returns A function that takes the first matrix and returns the comparison result.\n * @since 1.1.0\n */\n (b: Matrix2x2): (a: Matrix2x2) => boolean\n} = internal.equals\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","import type { ThreeDimensionalComponent, ThreeDimensionalIndex } from '../dimensions'\nimport type { Pipeable } from '../utils'\nimport type { Vector3 } from '../vector/vector3'\nimport type { Matrix2x2 } from './matrix2x2'\nimport type { Matrix3x3TypeId } from './matrix3x3.internal'\nimport * as internal from './matrix3x3.internal'\n\n/**\n * A coordinate in a 3x3 matrix.\n *\n * @since 1.0.0\n */\nexport type Matrix3x3Coordinate = ThreeDimensionalIndex | ThreeDimensionalComponent\n\n/**\n * A 3x3 matrix.\n *\n * All fields are readonly and immutable, and all operations create new instances.\n *\n * @since 1.0.0\n */\nexport interface Matrix3x3 extends Pipeable {\n readonly [Matrix3x3TypeId]: Matrix3x3TypeId\n /**\n * The value of the first row and first column.\n */\n readonly m00: number\n /**\n * The value of the first row and second column.\n */\n readonly m01: number\n /**\n * The value of the first row and third column.\n */\n readonly m02: number\n /**\n * The value of the second row and first column.\n */\n readonly m10: number\n /**\n * The value of the second row and second column.\n */\n readonly m11: number\n /**\n * The value of the second row and third column.\n */\n readonly m12: number\n /**\n * The value of the third row and first column.\n */\n readonly m20: number\n /**\n * The value of the third row and second column.\n */\n readonly m21: number\n /**\n * The value of the third row and third column.\n */\n readonly m22: number\n}\n\n/**\n * Checks if a value is a `Matrix3x3`.\n *\n * @param m - The value to check.\n * @returns `true` if the value is a `Matrix3x3`, `false` otherwise.\n * @since 1.0.0\n */\nexport const isMatrix3x3: (m: unknown) => m is Matrix3x3 = internal.isMatrix3x3\n\nexport const equals: {\n /**\n * Checks if two `Matrix3x3` instances are approximately equal within the\n * default absolute tolerance ({@link EPSILON}).\n *\n * @param a - The first matrix.\n * @param b - The second matrix.\n * @returns `true` when each pair of components is within tolerance.\n * @since 1.1.0\n */\n (a: Matrix3x3, b: Matrix3x3): boolean\n /**\n * Checks if two `Matrix3x3` instances are approximately equal within the\n * default absolute tolerance ({@link EPSILON}).\n *\n * @param b - The second matrix.\n * @returns A function that takes the first matrix and returns the comparison result.\n * @since 1.1.0\n */\n (b: Matrix3x3): (a: Matrix3x3) => boolean\n} = internal.equals\n\n/**\n * Creates a new `Matrix3x3` instance.\n *\n * @param m00 - The value of the first row and first column.\n * @param m01 - The value of the first row and second column.\n * @param m02 - The value of the first row and third column.\n * @param m10 - The value of the second row and first column.\n * @param m11 - The value of the second row and second column.\n * @param m12 - The value of the second row and third column.\n * @param m20 - The value of the third row and first column.\n * @param m21 - The value of the third row and second column.\n * @param m22 - The value of the third row and third column.\n * @returns A new `Matrix3x3` instance.\n * @since 1.0.0\n */\nexport const make: (\n m00?: number,\n m01?: number,\n m02?: number,\n m10?: number,\n m11?: number,\n m12?: number,\n m20?: number,\n m21?: number,\n m22?: number,\n) => Matrix3x3 = internal.make\n\n/**\n * Creates a new `Matrix3x3` instance from three row vectors.\n *\n * @param v0 - The first row vector.\n * @param v1 - The second row vector.\n * @param v2 - The third row vector.\n * @returns A new `Matrix3x3` instance.\n * @since 1.0.0\n */\nexport const fromRows: (v0: Vector3, v1: Vector3, v2: Vector3) => Matrix3x3 = internal.fromRows\n\n/**\n * Creates a new `Matrix3x3` instance from three column vectors.\n *\n * @param v0 - The first column vector.\n * @param v1 - The second column vector.\n * @param v2 - The third column vector.\n * @returns A new `Matrix3x3` instance.\n * @since 1.0.0\n */\nexport const fromColumns: (v0: Vector3, v1: Vector3, v2: Vector3) => Matrix3x3 =\n internal.fromColumns\n\nexport const setRow: {\n /**\n * Sets a row of the matrix to a new vector.\n *\n * @param m - The matrix to set the row of.\n * @param row - The row index to set.\n * @param v - The new vector for the row.\n * @returns A new matrix with the specified row set to the new vector.\n * @since 1.0.0\n */\n (m: Matrix3x3, row: Matrix3x3Coordinate, v: Vector3): Matrix3x3\n /**\n * Sets a row of the matrix to a new vector.\n *\n * @param row - The row index to set.\n * @param v - The new vector for the row.\n * @returns A function that takes a matrix and returns a new matrix with the specified row set to the new vector.\n * @since 1.0.0\n */\n (row: Matrix3x3Coordinate, v: Vector3): (m: Matrix3x3) => Matrix3x3\n} = internal.setRow\n\nexport const setColumn: {\n /**\n * Sets a column of the matrix to a new vector.\n *\n * @param m - The matrix to set the column of.\n * @param column - The column index to set.\n * @param v - The new vector for the column.\n * @returns A new matrix with the specified column set to the new vector.\n * @since 1.0.0\n */\n (m: Matrix3x3, column: Matrix3x3Coordinate, v: Vector3): Matrix3x3\n /**\n * Sets a column of the matrix to a new vector.\n *\n * @param column - The column index to set.\n * @param v - The new vector for the column.\n * @returns A function that takes a matrix and returns a new matrix with the specified column set to the new vector.\n * @since 1.0.0\n */\n (column: Matrix3x3Coordinate, v: Vector3): (m: Matrix3x3) => Matrix3x3\n} = internal.setColumn\n\n/**\n * Calculates the determinant of a 3x3 matrix.\n *\n * @param m - The matrix to calculate the determinant of.\n * @returns The determinant of the matrix.\n * @since 1.0.0\n */\nexport const determinant: (m: Matrix3x3) => number = internal.determinant\n\n/**\n * Calculates the minor of a 3x3 matrix.\n *\n * @param m - The matrix to calculate the minor of.\n * @param row - The row index of the element to calculate the minor for.\n * @param column - The column index of the element to calculate the minor for.\n * @returns The minor of the matrix at the specified row and column.\n * @since 1.0.0\n */\nexport const minor: (\n m: Matrix3x3,\n row: Matrix3x3Coordinate,\n column: Matrix3x3Coordinate,\n) => Matrix2x2 = internal.minor\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 Matrix3x3 from 'curvy/matrix3x3'\n * import * as Vector3 from 'curvy/vector3'\n *\n * const m = Matrix3x3.make(1, 2, 3, 4, 5, 6, 7, 8, 9)\n * const v = Vector3.vector3(10, 11, 12)\n *\n * // Performs:\n * // x = 1 * 10 + 2 * 11 + 3 * 12\n * // y = 4 * 10 + 5 * 11 + 6 * 12\n * // z = 7 * 10 + 8 * 11 + 9 * 12\n * const result = Matrix3x3.vectorProductLeft(m, v)\n * ```\n * @param m - The matrix to calculate the left vector product with.\n * @param v - The vector to calculate the left vector product with.\n * @returns The resulting vector from the left vector product.\n * @since 1.0.0\n */\n (m: Matrix3x3, v: Vector3): Vector3\n /**\n * Calculates the left vector product of a matrix and a vector.\n *\n * @example\n * ```ts\n * import * as Matrix3x3 from 'curvy/matrix3x3'\n * import * as Vector3 from 'curvy/vector3'\n *\n * const m = Matrix3x3.make(1, 2, 3, 4, 5, 6, 7, 8, 9)\n * const v = Vector3.vector3(10, 11, 12)\n *\n * // Performs:\n * // x = 1 * 10 + 2 * 11 + 3 * 12\n * // y = 4 * 10 + 5 * 11 + 6 * 12\n * // z = 7 * 10 + 8 * 11 + 9 * 12\n * const result = Matrix3x3.vectorProductLeft(v)(m)\n * ```\n * @param v - The vector to calculate the left vector product with.\n * @returns A function that takes a matrix and returns the resulting vector from the left vector product.\n * @since 1.0.0\n */\n (v: Vector3): (m: Matrix3x3) => Vector3\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 Matrix3x3 from 'curvy/matrix3x3'\n * import * as Vector3 from 'curvy/vector3'\n *\n * const m = Matrix3x3.make(1, 2, 3, 4, 5, 6, 7, 8, 9)\n * const v = Vector3.vector3(10, 11, 12)\n *\n * // Performs:\n * // x = 1 * 10 + 4 * 11 + 7 * 12\n * // y = 2 * 10 + 5 * 11 + 8 * 12\n * // z = 3 * 10 + 6 * 11 + 9 * 12\n * const result = Matrix3x3.vectorProductRight(m, v)\n * ```\n * @param m - The matrix to calculate the right vector product with.\n * @param v - The vector to calculate the right vector product with.\n * @returns The resulting vector from the right vector product.\n * @since 1.0.0\n */\n (m: Matrix3x3, v: Vector3): Vector3\n /**\n * Calculates the right vector product of a matrix and a vector.\n *\n * @example\n * ```ts\n * import * as Matrix3x3 from 'curvy/matrix3x3'\n * import * as Vector3 from 'curvy/vector3'\n *\n * const m = Matrix3x3.make(1, 2, 3, 4, 5, 6, 7, 8, 9)\n * const v = Vector3.vector3(10, 11, 12)\n *\n * // Performs:\n * // x = 1 * 10 + 4 * 11 + 7 * 12\n * // y = 2 * 10 + 5 * 11 + 8 * 12\n * // z = 3 * 10 + 6 * 11 + 9 * 12\n * const result = Matrix3x3.vectorProductRight(v)(m)\n * ```\n * @param v - The vector to calculate the right vector product with.\n * @returns A function that takes a matrix and returns the resulting vector from the right vector product.\n * @since 1.0.0\n */\n (v: Vector3): (m: Matrix3x3) => Vector3\n} = internal.vectorProductRight\n\nexport const solveSystem: {\n /**\n * Solves a system of equations represented by a matrix and a vector.\n *\n * @example\n * ```ts\n * import * as Matrix3x3 from 'curvy/matrix3x3'\n * import * as Vector3 from 'curvy/vector3'\n *\n * const m = Matrix3x3.make(1, 2, 3, 4, 5, 6, 7, 8, 9)\n * const v = Vector3.vector3(10, 11, 12)\n *\n * // Performs:\n * // x = m00 * x + m01 * y + m02 * z\n * // y = m10 * x + m11 * y + m12 * z\n * // z = m20 * x + m21 * y + m22 * z\n * const result = Matrix3x3.solveSystem(m, v)\n * ```\n * @since 1.0.0\n */\n (m: Matrix3x3, v: Vector3): Vector3\n /**\n * Solves a system of equations represented by a matrix and a vector.\n *\n * @example\n * ```ts\n * import * as Matrix3x3 from 'curvy/matrix3x3'\n * import * as Vector3 from 'curvy/vector3'\n *\n * const m = Matrix3x3.make(1, 2, 3, 4, 5, 6, 7, 8, 9)\n * const v = Vector3.vector3(10, 11, 12)\n *\n * // Performs:\n * // x = m00 * x + m01 * y + m02 * z\n * // y = m10 * x + m11 * y + m12 * z\n * // z = m20 * x + m21 * y + m22 * z\n * const result = Matrix3x3.solveSystem(v)(m)\n * ```\n * @since 1.0.0\n */\n (v: Vector3): (m: Matrix3x3) => Vector3\n} = internal.solveSystem\n\n/**\n * Returns the rows of a `Matrix3x3` as an array of vectors.\n *\n * @param m - The matrix to get the rows from.\n * @returns An array of vectors representing the rows of the matrix.\n * @since 1.0.0\n */\nexport const toRows: (m: Matrix3x3) => [Vector3, Vector3, Vector3] = internal.toRows as (\n m: Matrix3x3,\n) => [Vector3, Vector3, Vector3]\n\n/**\n * Returns the columns of a `Matrix3x3` as an array of vectors.\n *\n * @param m - The matrix to get the columns from.\n * @returns An array of vectors representing the columns of the matrix.\n * @since 1.0.0\n */\nexport const toColumns: (m: Matrix3x3) => [Vector3, Vector3, Vector3] = internal.toColumns as (\n m: Matrix3x3,\n) => [Vector3, Vector3, Vector3]\n\nexport const rowVector: {\n /**\n * Gets a row vector from the matrix.\n *\n * @param m - The matrix to get the row vector from.\n * @param row - The row index to get the vector from.\n * @returns The row vector at the specified index.\n * @since 1.0.0\n */\n (m: Matrix3x3, row: Matrix3x3Coordinate): Vector3\n /**\n * Gets a row vector from the matrix.\n *\n * @param row - The row index to get the vector from.\n * @returns A function that takes a matrix and returns the row vector at the specified index.\n * @since 1.0.0\n */\n (row: Matrix3x3Coordinate): (m: Matrix3x3) => Vector3\n} = internal.rowVector\n\nexport const columnVector: {\n /**\n * Gets a column vector from the matrix.\n *\n * @param m - The matrix to get the column vector from.\n * @param column - The column index to get the vector from.\n * @returns The column vector at the specified index.\n * @since 1.0.0\n */\n (m: Matrix3x3, column: Matrix3x3Coordinate): Vector3\n /**\n * Gets a column vector from the matrix.\n *\n * @param column - The column index to get the vector from.\n * @returns A function that takes a matrix and returns the column vector at the specified index.\n * @since 1.0.0\n */\n (column: Matrix3x3Coordinate): (m: Matrix3x3) => Vector3\n} = internal.columnVector\n\n/**\n * Transposes a `Matrix3x3`.\n *\n * @param m - The matrix to transpose.\n * @returns A new `Matrix3x3` instance that is the transpose of the input matrix.\n * @since 1.0.0\n */\nexport const transpose: (m: Matrix3x3) => Matrix3x3 = internal.transpose\n\n/**\n * Reverses the rows of a `Matrix3x3`.\n *\n * @param m - The matrix to reverse the rows of.\n * @returns A new `Matrix3x3` instance with the rows reversed.\n * @since 1.0.0\n */\nexport const reverseRows: (m: Matrix3x3) => Matrix3x3 = internal.reverseRows\n\n/**\n * Reverses the columns of a `Matrix3x3`.\n *\n * @param m - The matrix to reverse the columns of.\n * @returns A new `Matrix3x3` instance with the columns reversed.\n * @since 1.0.0\n */\nexport const reverseColumns: (m: Matrix3x3) => Matrix3x3 = internal.reverseColumns\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgDA,MAAa,cAA8CA;AAE3D,MAAaC,WAoBTC;;;;;;;;;AAUJ,MAAaC,SACXC;;;;;;;;;AAUF,MAAaC,aAAoDC;;;;;;;;;AAUjE,MAAaC,gBAAuDC;AAEpE,MAAaC,WAoBTC;AAEJ,MAAaC,cAoBTC;;;;;;;;AASJ,MAAaC,gBAAwCC;AAErD,MAAaC,sBA4CTC;AAEJ,MAAaC,uBA4CTC;AAEJ,MAAaC,gBA4CTC;;;;;;;;AASJ,MAAaC,WAA+CC;;;;;;;;AAS5D,MAAaC,cAAkDC;;;;;;;;;AAU/D,MAAaC,cAAiEC;;;;;;;;;AAU9E,MAAaC,iBACXC;;;;;;;;AASF,MAAaC,cAAyCC;;;;;;;;AAStD,MAAaC,gBAA2CC;;;;;;;;AASxD,MAAaC,mBAA8CC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AClS3D,MAAa,cAA8CC;AAE3D,MAAa,SAoBTC;;;;;;;;;;;;;;;;AAiBJ,MAAa,OAUIC;;;;;;;;;;AAWjB,MAAa,WAAiEC;;;;;;;;;;AAW9E,MAAa,cACXC;AAEF,MAAa,SAoBTC;AAEJ,MAAa,YAoBTC;;;;;;;;AASJ,MAAa,cAAwCC;;;;;;;;;;AAWrD,MAAa,QAIIC;AAEjB,MAAa,oBA8CTC;AAEJ,MAAa,qBA8CTC;AAEJ,MAAa,cAyCTC;;;;;;;;AASJ,MAAa,SAAwDC;;;;;;;;AAWrE,MAAa,YAA2DC;AAIxE,MAAa,YAkBTC;AAEJ,MAAa,eAkBTC;;;;;;;;AASJ,MAAa,YAAyCC;;;;;;;;AAStD,MAAa,cAA2CC;;;;;;;;AASxD,MAAa,iBAA8CC"}