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.
- package/dist/characteristic/index.d.mts +88 -0
- package/dist/characteristic/index.mjs +2 -0
- package/dist/curve/index.d.mts +2 -0
- package/dist/curve/index.mjs +2 -0
- package/dist/interval/index.d.mts +3 -0
- package/dist/interval/index.mjs +3 -0
- package/dist/matrix/index.d.mts +2 -0
- package/dist/matrix/index.mjs +267 -0
- package/dist/matrix/index.mjs.map +1 -0
- package/dist/number.d.mts +280 -0
- package/dist/number.mjs +140 -0
- package/dist/number.mjs.map +1 -0
- package/dist/path/index.d.mts +261 -0
- package/dist/path/index.mjs +325 -0
- package/dist/path/index.mjs.map +1 -0
- package/dist/polynomial/index.d.mts +2 -0
- package/dist/polynomial/index.mjs +3 -0
- package/dist/shared/characteristic-B9nCh_cx.mjs +104 -0
- package/dist/shared/characteristic-B9nCh_cx.mjs.map +1 -0
- package/dist/shared/chunk-25Hzd3z8.mjs +13 -0
- package/dist/shared/cubic-BajUY0JT.d.mts +1100 -0
- package/dist/shared/cubic-CpHAx8cC.mjs +479 -0
- package/dist/shared/cubic-CpHAx8cC.mjs.map +1 -0
- package/dist/shared/interval-05CR6eBf.mjs +421 -0
- package/dist/shared/interval-05CR6eBf.mjs.map +1 -0
- package/dist/shared/interval-Dy-RMEE3.d.mts +533 -0
- package/dist/shared/interval2d-8IBZnUOq.mjs +108 -0
- package/dist/shared/interval2d-8IBZnUOq.mjs.map +1 -0
- package/dist/shared/interval2d-C2id9u31.d.mts +172 -0
- package/dist/shared/matrix4x4-Ck2WROK-.mjs +440 -0
- package/dist/shared/matrix4x4-Ck2WROK-.mjs.map +1 -0
- package/dist/shared/matrix4x4-Dm_tSiH1.d.mts +1183 -0
- package/dist/shared/quadratic-CamozcFc.mjs +330 -0
- package/dist/shared/quadratic-CamozcFc.mjs.map +1 -0
- package/dist/shared/rationalCubic2d-B6g97ryJ.d.mts +308 -0
- package/dist/shared/rationalCubic2d-BEgUGSFf.mjs +295 -0
- package/dist/shared/rationalCubic2d-BEgUGSFf.mjs.map +1 -0
- package/dist/shared/rationalCubic2d-Bys2Uory.mjs +695 -0
- package/dist/shared/rationalCubic2d-Bys2Uory.mjs.map +1 -0
- package/dist/shared/rationalCubic2d-DlQfBURs.d.mts +818 -0
- package/dist/shared/solution-CrtLfqEq.mjs +306 -0
- package/dist/shared/solution-CrtLfqEq.mjs.map +1 -0
- package/dist/shared/solution-sNQ-ZVhN.d.mts +251 -0
- package/dist/{pipe.d.mts → shared/utils-MCckigYk.d.mts} +44 -26
- package/dist/shared/vector2-CL1HDdPr.mjs +187 -0
- package/dist/shared/vector2-CL1HDdPr.mjs.map +1 -0
- package/dist/shared/vector2-DPUY3_eA.d.mts +470 -0
- package/dist/shared/vector2.internal-DU_E808S.mjs +97 -0
- package/dist/shared/vector2.internal-DU_E808S.mjs.map +1 -0
- package/dist/shared/vector3-D-tv_aKL.mjs +204 -0
- package/dist/shared/vector3-D-tv_aKL.mjs.map +1 -0
- package/dist/shared/vector3-DqeOZtOB.d.mts +703 -0
- package/dist/shared/vector4-5KbjoHVj.mjs +109 -0
- package/dist/shared/vector4-5KbjoHVj.mjs.map +1 -0
- package/dist/shared/vector4.internal-5XcaX12X.mjs +163 -0
- package/dist/shared/vector4.internal-5XcaX12X.mjs.map +1 -0
- package/dist/solution/index.d.mts +2 -0
- package/dist/solution/index.mjs +2 -0
- package/dist/splines/index.d.mts +701 -0
- package/dist/splines/index.mjs +734 -0
- package/dist/splines/index.mjs.map +1 -0
- package/dist/utils.d.mts +2 -205
- package/dist/utils.mjs +88 -52
- package/dist/utils.mjs.map +1 -1
- package/dist/vector/index.d.mts +3 -0
- package/dist/vector/index.mjs +4 -0
- package/package.json +49 -92
- package/dist/curve/cubic2d.d.mts +0 -109
- package/dist/curve/cubic2d.d.ts +0 -109
- package/dist/curve/cubic2d.mjs +0 -80
- package/dist/curve/cubic2d.mjs.map +0 -1
- package/dist/curve/linear2d.d.mts +0 -94
- package/dist/curve/linear2d.d.ts +0 -94
- package/dist/curve/linear2d.mjs +0 -46
- package/dist/curve/linear2d.mjs.map +0 -1
- package/dist/curve/quadratic2d.d.mts +0 -117
- package/dist/curve/quadratic2d.d.ts +0 -117
- package/dist/curve/quadratic2d.mjs +0 -82
- package/dist/curve/quadratic2d.mjs.map +0 -1
- package/dist/interval.d.mts +0 -251
- package/dist/interval.d.ts +0 -251
- package/dist/interval.mjs +0 -86
- package/dist/interval.mjs.map +0 -1
- package/dist/matrix/matrix2x2.d.mts +0 -320
- package/dist/matrix/matrix2x2.d.ts +0 -320
- package/dist/matrix/matrix2x2.mjs +0 -25
- package/dist/matrix/matrix2x2.mjs.map +0 -1
- package/dist/matrix/matrix3x3.d.mts +0 -370
- package/dist/matrix/matrix3x3.d.ts +0 -370
- package/dist/matrix/matrix3x3.mjs +0 -28
- package/dist/matrix/matrix3x3.mjs.map +0 -1
- package/dist/matrix/matrix4x4.d.mts +0 -381
- package/dist/matrix/matrix4x4.d.ts +0 -381
- package/dist/matrix/matrix4x4.mjs +0 -178
- package/dist/matrix/matrix4x4.mjs.map +0 -1
- package/dist/path/cubic2d.d.mts +0 -95
- package/dist/path/cubic2d.d.ts +0 -95
- package/dist/path/cubic2d.mjs +0 -60
- package/dist/path/cubic2d.mjs.map +0 -1
- package/dist/path/linear2d.d.mts +0 -95
- package/dist/path/linear2d.d.ts +0 -95
- package/dist/path/linear2d.mjs +0 -53
- package/dist/path/linear2d.mjs.map +0 -1
- package/dist/path/quadratic2d.d.mts +0 -95
- package/dist/path/quadratic2d.d.ts +0 -95
- package/dist/path/quadratic2d.mjs +0 -57
- package/dist/path/quadratic2d.mjs.map +0 -1
- package/dist/pipe.d.ts +0 -58
- package/dist/pipe.mjs +0 -92
- package/dist/pipe.mjs.map +0 -1
- package/dist/polynomial/cubic.d.mts +0 -7
- package/dist/polynomial/cubic.d.ts +0 -7
- package/dist/polynomial/cubic.mjs +0 -133
- package/dist/polynomial/cubic.mjs.map +0 -1
- package/dist/polynomial/linear.d.mts +0 -7
- package/dist/polynomial/linear.d.ts +0 -7
- package/dist/polynomial/linear.mjs +0 -24
- package/dist/polynomial/linear.mjs.map +0 -1
- package/dist/polynomial/quadratic.d.mts +0 -7
- package/dist/polynomial/quadratic.d.ts +0 -7
- package/dist/polynomial/quadratic.mjs +0 -27
- package/dist/polynomial/quadratic.mjs.map +0 -1
- package/dist/shared/curvy.Bf5TIk31.d.mts +0 -22
- package/dist/shared/curvy.Bf5TIk31.d.ts +0 -22
- package/dist/shared/curvy.BkkW8Tx9.mjs +0 -102
- package/dist/shared/curvy.BkkW8Tx9.mjs.map +0 -1
- package/dist/shared/curvy.BxdGW9he.mjs +0 -116
- package/dist/shared/curvy.BxdGW9he.mjs.map +0 -1
- package/dist/shared/curvy.C_sCeg9J.mjs +0 -66
- package/dist/shared/curvy.C_sCeg9J.mjs.map +0 -1
- package/dist/shared/curvy.Cg8lZVUz.d.ts +0 -688
- package/dist/shared/curvy.DCt1gGII.mjs +0 -147
- package/dist/shared/curvy.DCt1gGII.mjs.map +0 -1
- package/dist/shared/curvy.DJ4xO0al.mjs +0 -63
- package/dist/shared/curvy.DJ4xO0al.mjs.map +0 -1
- package/dist/shared/curvy.DmVFTi0N.mjs +0 -35
- package/dist/shared/curvy.DmVFTi0N.mjs.map +0 -1
- package/dist/shared/curvy.FDaj5rlj.d.mts +0 -688
- package/dist/shared/curvy.lktriTpx.mjs +0 -101
- package/dist/shared/curvy.lktriTpx.mjs.map +0 -1
- package/dist/shared/curvy.mLFprrGm.mjs +0 -85
- package/dist/shared/curvy.mLFprrGm.mjs.map +0 -1
- package/dist/shared/curvy.r6f1j287.mjs +0 -76
- package/dist/shared/curvy.r6f1j287.mjs.map +0 -1
- package/dist/splines/basis2d.d.mts +0 -130
- package/dist/splines/basis2d.d.ts +0 -130
- package/dist/splines/basis2d.mjs +0 -90
- package/dist/splines/basis2d.mjs.map +0 -1
- package/dist/splines/bezier2d.d.mts +0 -182
- package/dist/splines/bezier2d.d.ts +0 -182
- package/dist/splines/bezier2d.mjs +0 -23
- package/dist/splines/bezier2d.mjs.map +0 -1
- package/dist/splines/cardinal2d.d.mts +0 -178
- package/dist/splines/cardinal2d.d.ts +0 -178
- package/dist/splines/cardinal2d.mjs +0 -114
- package/dist/splines/cardinal2d.mjs.map +0 -1
- package/dist/splines/hermite2d.d.mts +0 -124
- package/dist/splines/hermite2d.d.ts +0 -124
- package/dist/splines/hermite2d.mjs +0 -63
- package/dist/splines/hermite2d.mjs.map +0 -1
- package/dist/utils.d.ts +0 -205
- package/dist/vector/vector2.d.mts +0 -324
- package/dist/vector/vector2.d.ts +0 -324
- package/dist/vector/vector2.mjs +0 -30
- package/dist/vector/vector2.mjs.map +0 -1
- package/dist/vector/vector3.d.mts +0 -417
- package/dist/vector/vector3.d.ts +0 -417
- package/dist/vector/vector3.mjs +0 -38
- package/dist/vector/vector3.mjs.map +0 -1
- package/dist/vector/vector4.d.mts +0 -205
- package/dist/vector/vector4.d.ts +0 -205
- package/dist/vector/vector4.mjs +0 -20
- package/dist/vector/vector4.mjs.map +0 -1
|
@@ -1,370 +0,0 @@
|
|
|
1
|
-
import { b as ThreeDimensionalIndex, c as ThreeDimensionalComponent } from '../shared/curvy.Bf5TIk31.mjs';
|
|
2
|
-
import { Pipeable } from '../pipe.mjs';
|
|
3
|
-
import { Vector3 } from '../vector/vector3.mjs';
|
|
4
|
-
import { Matrix2x2 } from './matrix2x2.mjs';
|
|
5
|
-
import '../vector/vector2.mjs';
|
|
6
|
-
|
|
7
|
-
declare const Matrix3x3TypeId: unique symbol;
|
|
8
|
-
type Matrix3x3TypeId = typeof Matrix3x3TypeId;
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* A coordinate in a 3x3 matrix.
|
|
12
|
-
*
|
|
13
|
-
* @since 1.0.0
|
|
14
|
-
*/
|
|
15
|
-
type Matrix3x3Coordinate = ThreeDimensionalIndex | ThreeDimensionalComponent;
|
|
16
|
-
/**
|
|
17
|
-
* A 3x3 matrix.
|
|
18
|
-
*
|
|
19
|
-
* All fields are readonly and immutable, and all operations create new instances.
|
|
20
|
-
*
|
|
21
|
-
* @since 1.0.0
|
|
22
|
-
*/
|
|
23
|
-
interface Matrix3x3 extends Pipeable {
|
|
24
|
-
readonly [Matrix3x3TypeId]: Matrix3x3TypeId;
|
|
25
|
-
/**
|
|
26
|
-
* The value of the first row and first column.
|
|
27
|
-
*/
|
|
28
|
-
readonly m00: number;
|
|
29
|
-
/**
|
|
30
|
-
* The value of the first row and second column.
|
|
31
|
-
*/
|
|
32
|
-
readonly m01: number;
|
|
33
|
-
/**
|
|
34
|
-
* The value of the first row and third column.
|
|
35
|
-
*/
|
|
36
|
-
readonly m02: number;
|
|
37
|
-
/**
|
|
38
|
-
* The value of the second row and first column.
|
|
39
|
-
*/
|
|
40
|
-
readonly m10: number;
|
|
41
|
-
/**
|
|
42
|
-
* The value of the second row and second column.
|
|
43
|
-
*/
|
|
44
|
-
readonly m11: number;
|
|
45
|
-
/**
|
|
46
|
-
* The value of the second row and third column.
|
|
47
|
-
*/
|
|
48
|
-
readonly m12: number;
|
|
49
|
-
/**
|
|
50
|
-
* The value of the third row and first column.
|
|
51
|
-
*/
|
|
52
|
-
readonly m20: number;
|
|
53
|
-
/**
|
|
54
|
-
* The value of the third row and second column.
|
|
55
|
-
*/
|
|
56
|
-
readonly m21: number;
|
|
57
|
-
/**
|
|
58
|
-
* The value of the third row and third column.
|
|
59
|
-
*/
|
|
60
|
-
readonly m22: number;
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Checks if a value is a `Matrix3x3`.
|
|
64
|
-
*
|
|
65
|
-
* @param m - The value to check.
|
|
66
|
-
* @returns `true` if the value is a `Matrix3x3`, `false` otherwise.
|
|
67
|
-
* @since 1.0.0
|
|
68
|
-
*/
|
|
69
|
-
declare const isMatrix3x3: (m: unknown) => m is Matrix3x3;
|
|
70
|
-
/**
|
|
71
|
-
* Creates a new `Matrix3x3` instance.
|
|
72
|
-
*
|
|
73
|
-
* @param m00 - The value of the first row and first column.
|
|
74
|
-
* @param m01 - The value of the first row and second column.
|
|
75
|
-
* @param m02 - The value of the first row and third column.
|
|
76
|
-
* @param m10 - The value of the second row and first column.
|
|
77
|
-
* @param m11 - The value of the second row and second column.
|
|
78
|
-
* @param m12 - The value of the second row and third column.
|
|
79
|
-
* @param m20 - The value of the third row and first column.
|
|
80
|
-
* @param m21 - The value of the third row and second column.
|
|
81
|
-
* @param m22 - The value of the third row and third column.
|
|
82
|
-
* @returns A new `Matrix3x3` instance.
|
|
83
|
-
* @since 1.0.0
|
|
84
|
-
*/
|
|
85
|
-
declare const matrix3x3: (m00?: number, m01?: number, m02?: number, m10?: number, m11?: number, m12?: number, m20?: number, m21?: number, m22?: number) => Matrix3x3;
|
|
86
|
-
/**
|
|
87
|
-
* Creates a new `Matrix3x3` instance from three row vectors.
|
|
88
|
-
*
|
|
89
|
-
* @param v0 - The first row vector.
|
|
90
|
-
* @param v1 - The second row vector.
|
|
91
|
-
* @param v2 - The third row vector.
|
|
92
|
-
* @returns A new `Matrix3x3` instance.
|
|
93
|
-
* @since 1.0.0
|
|
94
|
-
*/
|
|
95
|
-
declare const fromRows: (v0: Vector3, v1: Vector3, v2: Vector3) => Matrix3x3;
|
|
96
|
-
/**
|
|
97
|
-
* Creates a new `Matrix3x3` instance from three column vectors.
|
|
98
|
-
*
|
|
99
|
-
* @param v0 - The first column vector.
|
|
100
|
-
* @param v1 - The second column vector.
|
|
101
|
-
* @param v2 - The third column vector.
|
|
102
|
-
* @returns A new `Matrix3x3` instance.
|
|
103
|
-
* @since 1.0.0
|
|
104
|
-
*/
|
|
105
|
-
declare const fromColumns: (v0: Vector3, v1: Vector3, v2: Vector3) => Matrix3x3;
|
|
106
|
-
declare const setRow: {
|
|
107
|
-
/**
|
|
108
|
-
* Sets a row of the matrix to a new vector.
|
|
109
|
-
*
|
|
110
|
-
* @param m - The matrix to set the row of.
|
|
111
|
-
* @param row - The row index to set.
|
|
112
|
-
* @param v - The new vector for the row.
|
|
113
|
-
* @returns A new matrix with the specified row set to the new vector.
|
|
114
|
-
*/
|
|
115
|
-
(m: Matrix3x3, row: Matrix3x3Coordinate, v: Vector3): Matrix3x3;
|
|
116
|
-
/**
|
|
117
|
-
* Sets a row of the matrix to a new vector.
|
|
118
|
-
*
|
|
119
|
-
* @param row - The row index to set.
|
|
120
|
-
* @param v - The new vector for the row.
|
|
121
|
-
* @returns A function that takes a matrix and returns a new matrix with the specified row set to the new vector.
|
|
122
|
-
*/
|
|
123
|
-
(row: Matrix3x3Coordinate, v: Vector3): (m: Matrix3x3) => Matrix3x3;
|
|
124
|
-
};
|
|
125
|
-
declare const setColumn: {
|
|
126
|
-
/**
|
|
127
|
-
* Sets a column of the matrix to a new vector.
|
|
128
|
-
*
|
|
129
|
-
* @param m - The matrix to set the column of.
|
|
130
|
-
* @param column - The column index to set.
|
|
131
|
-
* @param v - The new vector for the column.
|
|
132
|
-
* @returns A new matrix with the specified column set to the new vector.
|
|
133
|
-
*/
|
|
134
|
-
(m: Matrix3x3, column: Matrix3x3Coordinate, v: Vector3): Matrix3x3;
|
|
135
|
-
/**
|
|
136
|
-
* Sets a column of the matrix to a new vector.
|
|
137
|
-
*
|
|
138
|
-
* @param column - The column index to set.
|
|
139
|
-
* @param v - The new vector for the column.
|
|
140
|
-
* @returns A function that takes a matrix and returns a new matrix with the specified column set to the new vector.
|
|
141
|
-
*/
|
|
142
|
-
(column: Matrix3x3Coordinate, v: Vector3): (m: Matrix3x3) => Matrix3x3;
|
|
143
|
-
};
|
|
144
|
-
/**
|
|
145
|
-
* Calculates the determinant of a 3x3 matrix.
|
|
146
|
-
*
|
|
147
|
-
* @param m - The matrix to calculate the determinant of.
|
|
148
|
-
* @returns The determinant of the matrix.
|
|
149
|
-
* @since 1.0.0
|
|
150
|
-
*/
|
|
151
|
-
declare const determinant: (m: Matrix3x3) => number;
|
|
152
|
-
/**
|
|
153
|
-
* Calculates the minor of a 3x3 matrix.
|
|
154
|
-
*
|
|
155
|
-
* @param m - The matrix to calculate the minor of.
|
|
156
|
-
* @param row - The row index of the element to calculate the minor for.
|
|
157
|
-
* @param column - The column index of the element to calculate the minor for.
|
|
158
|
-
* @returns The minor of the matrix at the specified row and column.
|
|
159
|
-
* @since 1.0.0
|
|
160
|
-
*/
|
|
161
|
-
declare const minor: (m: Matrix3x3, row: Matrix3x3Coordinate, column: Matrix3x3Coordinate) => Matrix2x2;
|
|
162
|
-
declare const vectorProductLeft: {
|
|
163
|
-
/**
|
|
164
|
-
* Calculates the left vector product of a matrix and a vector.
|
|
165
|
-
*
|
|
166
|
-
* @example
|
|
167
|
-
* ```ts
|
|
168
|
-
* import * as Matrix3x3 from 'curvy/matrix3x3'
|
|
169
|
-
* import * as Vector3 from 'curvy/vector3'
|
|
170
|
-
*
|
|
171
|
-
* const m = Matrix3x3.matrix3x3(1, 2, 3, 4, 5, 6, 7, 8, 9)
|
|
172
|
-
* const v = Vector3.vector3(10, 11, 12)
|
|
173
|
-
*
|
|
174
|
-
* // Performs:
|
|
175
|
-
* // x = 1 * 10 + 2 * 11 + 3 * 12
|
|
176
|
-
* // y = 4 * 10 + 5 * 11 + 6 * 12
|
|
177
|
-
* // z = 7 * 10 + 8 * 11 + 9 * 12
|
|
178
|
-
* const result = Matrix3x3.vectorProductLeft(m, v)
|
|
179
|
-
* ```
|
|
180
|
-
* @param m - The matrix to calculate the left vector product with.
|
|
181
|
-
* @param v - The vector to calculate the left vector product with.
|
|
182
|
-
* @returns The resulting vector from the left vector product.
|
|
183
|
-
* @since 1.0.0
|
|
184
|
-
*/
|
|
185
|
-
(m: Matrix3x3, v: Vector3): Vector3;
|
|
186
|
-
/**
|
|
187
|
-
* Calculates the left vector product of a matrix and a vector.
|
|
188
|
-
*
|
|
189
|
-
* @example
|
|
190
|
-
* ```ts
|
|
191
|
-
* import * as Matrix3x3 from 'curvy/matrix3x3'
|
|
192
|
-
* import * as Vector3 from 'curvy/vector3'
|
|
193
|
-
*
|
|
194
|
-
* const m = Matrix3x3.matrix3x3(1, 2, 3, 4, 5, 6, 7, 8, 9)
|
|
195
|
-
* const v = Vector3.vector3(10, 11, 12)
|
|
196
|
-
*
|
|
197
|
-
* // Performs:
|
|
198
|
-
* // x = 1 * 10 + 2 * 11 + 3 * 12
|
|
199
|
-
* // y = 4 * 10 + 5 * 11 + 6 * 12
|
|
200
|
-
* // z = 7 * 10 + 8 * 11 + 9 * 12
|
|
201
|
-
* const result = Matrix3x3.vectorProductLeft(v)(m)
|
|
202
|
-
* ```
|
|
203
|
-
* @param v - The vector to calculate the left vector product with.
|
|
204
|
-
* @returns A function that takes a matrix and returns the resulting vector from the left vector product.
|
|
205
|
-
*/
|
|
206
|
-
(v: Vector3): (m: Matrix3x3) => Vector3;
|
|
207
|
-
};
|
|
208
|
-
declare const vectorProductRight: {
|
|
209
|
-
/**
|
|
210
|
-
* Calculates the right vector product of a matrix and a vector.
|
|
211
|
-
*
|
|
212
|
-
* @example
|
|
213
|
-
* ```ts
|
|
214
|
-
* import * as Matrix3x3 from 'curvy/matrix3x3'
|
|
215
|
-
* import * as Vector3 from 'curvy/vector3'
|
|
216
|
-
*
|
|
217
|
-
* const m = Matrix3x3.matrix3x3(1, 2, 3, 4, 5, 6, 7, 8, 9)
|
|
218
|
-
* const v = Vector3.vector3(10, 11, 12)
|
|
219
|
-
*
|
|
220
|
-
* // Performs:
|
|
221
|
-
* // x = 1 * 10 + 4 * 11 + 7 * 12
|
|
222
|
-
* // y = 2 * 10 + 5 * 11 + 8 * 12
|
|
223
|
-
* // z = 3 * 10 + 6 * 11 + 9 * 12
|
|
224
|
-
* const result = Matrix3x3.vectorProductRight(m, v)
|
|
225
|
-
* ```
|
|
226
|
-
* @param m - The matrix to calculate the right vector product with.
|
|
227
|
-
* @param v - The vector to calculate the right vector product with.
|
|
228
|
-
* @returns The resulting vector from the right vector product.
|
|
229
|
-
*/
|
|
230
|
-
(m: Matrix3x3, v: Vector3): Vector3;
|
|
231
|
-
/**
|
|
232
|
-
* Calculates the right vector product of a matrix and a vector.
|
|
233
|
-
*
|
|
234
|
-
* @example
|
|
235
|
-
* ```ts
|
|
236
|
-
* import * as Matrix3x3 from 'curvy/matrix3x3'
|
|
237
|
-
* import * as Vector3 from 'curvy/vector3'
|
|
238
|
-
*
|
|
239
|
-
* const m = Matrix3x3.matrix3x3(1, 2, 3, 4, 5, 6, 7, 8, 9)
|
|
240
|
-
* const v = Vector3.vector3(10, 11, 12)
|
|
241
|
-
*
|
|
242
|
-
* // Performs:
|
|
243
|
-
* // x = 1 * 10 + 4 * 11 + 7 * 12
|
|
244
|
-
* // y = 2 * 10 + 5 * 11 + 8 * 12
|
|
245
|
-
* // z = 3 * 10 + 6 * 11 + 9 * 12
|
|
246
|
-
* const result = Matrix3x3.vectorProductRight(v)(m)
|
|
247
|
-
* ```
|
|
248
|
-
* @param v - The vector to calculate the right vector product with.
|
|
249
|
-
* @returns A function that takes a matrix and returns the resulting vector from the right vector product.
|
|
250
|
-
* @since 1.0.0
|
|
251
|
-
*/
|
|
252
|
-
(v: Vector3): (m: Matrix3x3) => Vector3;
|
|
253
|
-
};
|
|
254
|
-
declare const solveSystem: {
|
|
255
|
-
/**
|
|
256
|
-
* Solves a system of equations represented by a matrix and a vector.
|
|
257
|
-
*
|
|
258
|
-
* @example
|
|
259
|
-
* ```ts
|
|
260
|
-
* import * as Matrix3x3 from 'curvy/matrix3x3'
|
|
261
|
-
* import * as Vector3 from 'curvy/vector3'
|
|
262
|
-
*
|
|
263
|
-
* const m = Matrix3x3.matrix3x3(1, 2, 3, 4, 5, 6, 7, 8, 9)
|
|
264
|
-
* const v = Vector3.vector3(10, 11, 12)
|
|
265
|
-
*
|
|
266
|
-
* // Performs:
|
|
267
|
-
* // x = m00 * x + m01 * y + m02 * z
|
|
268
|
-
* // y = m10 * x + m11 * y + m12 * z
|
|
269
|
-
* // z = m20 * x + m21 * y + m22 * z
|
|
270
|
-
* const result = Matrix3x3.solveSystem(m, v)
|
|
271
|
-
* ```
|
|
272
|
-
*/
|
|
273
|
-
(m: Matrix3x3, v: Vector3): Vector3;
|
|
274
|
-
/**
|
|
275
|
-
* Solves a system of equations represented by a matrix and a vector.
|
|
276
|
-
*
|
|
277
|
-
* @example
|
|
278
|
-
* ```ts
|
|
279
|
-
* import * as Matrix3x3 from 'curvy/matrix3x3'
|
|
280
|
-
* import * as Vector3 from 'curvy/vector3'
|
|
281
|
-
*
|
|
282
|
-
* const m = Matrix3x3.matrix3x3(1, 2, 3, 4, 5, 6, 7, 8, 9)
|
|
283
|
-
* const v = Vector3.vector3(10, 11, 12)
|
|
284
|
-
*
|
|
285
|
-
* // Performs:
|
|
286
|
-
* // x = m00 * x + m01 * y + m02 * z
|
|
287
|
-
* // y = m10 * x + m11 * y + m12 * z
|
|
288
|
-
* // z = m20 * x + m21 * y + m22 * z
|
|
289
|
-
* const result = Matrix3x3.solveSystem(v)(m)
|
|
290
|
-
* ```
|
|
291
|
-
*/
|
|
292
|
-
(v: Vector3): (m: Matrix3x3) => Vector3;
|
|
293
|
-
};
|
|
294
|
-
/**
|
|
295
|
-
* Returns the rows of a `Matrix3x3` as an array of vectors.
|
|
296
|
-
*
|
|
297
|
-
* @param m - The matrix to get the rows from.
|
|
298
|
-
* @returns An array of vectors representing the rows of the matrix.
|
|
299
|
-
* @since 1.0.0
|
|
300
|
-
*/
|
|
301
|
-
declare const toRows: (m: Matrix3x3) => [Vector3, Vector3, Vector3];
|
|
302
|
-
/**
|
|
303
|
-
* Returns the columns of a `Matrix3x3` as an array of vectors.
|
|
304
|
-
*
|
|
305
|
-
* @param m - The matrix to get the columns from.
|
|
306
|
-
* @returns An array of vectors representing the columns of the matrix.
|
|
307
|
-
* @since 1.0.0
|
|
308
|
-
*/
|
|
309
|
-
declare const toColumns: (m: Matrix3x3) => [Vector3, Vector3, Vector3];
|
|
310
|
-
declare const rowVector: {
|
|
311
|
-
/**
|
|
312
|
-
* Gets a row vector from the matrix.
|
|
313
|
-
*
|
|
314
|
-
* @param m - The matrix to get the row vector from.
|
|
315
|
-
* @param row - The row index to get the vector from.
|
|
316
|
-
* @returns The row vector at the specified index.
|
|
317
|
-
*/
|
|
318
|
-
(m: Matrix3x3, row: Matrix3x3Coordinate): Vector3;
|
|
319
|
-
/**
|
|
320
|
-
* Gets a row vector from the matrix.
|
|
321
|
-
*
|
|
322
|
-
* @param row - The row index to get the vector from.
|
|
323
|
-
* @returns A function that takes a matrix and returns the row vector at the specified index.
|
|
324
|
-
*/
|
|
325
|
-
(row: Matrix3x3Coordinate): (m: Matrix3x3) => Vector3;
|
|
326
|
-
};
|
|
327
|
-
declare const columnVector: {
|
|
328
|
-
/**
|
|
329
|
-
* Gets a column vector from the matrix.
|
|
330
|
-
*
|
|
331
|
-
* @param m - The matrix to get the column vector from.
|
|
332
|
-
* @param column - The column index to get the vector from.
|
|
333
|
-
* @returns The column vector at the specified index.
|
|
334
|
-
*/
|
|
335
|
-
(m: Matrix3x3, column: Matrix3x3Coordinate): Vector3;
|
|
336
|
-
/**
|
|
337
|
-
* Gets a column vector from the matrix.
|
|
338
|
-
*
|
|
339
|
-
* @param column - The column index to get the vector from.
|
|
340
|
-
* @returns A function that takes a matrix and returns the column vector at the specified index.
|
|
341
|
-
*/
|
|
342
|
-
(column: Matrix3x3Coordinate): (m: Matrix3x3) => Vector3;
|
|
343
|
-
};
|
|
344
|
-
/**
|
|
345
|
-
* Transposes a `Matrix3x3`.
|
|
346
|
-
*
|
|
347
|
-
* @param m - The matrix to transpose.
|
|
348
|
-
* @returns A new `Matrix3x3` instance that is the transpose of the input matrix.
|
|
349
|
-
* @since 1.0.0
|
|
350
|
-
*/
|
|
351
|
-
declare const transpose: (m: Matrix3x3) => Matrix3x3;
|
|
352
|
-
/**
|
|
353
|
-
* Reverses the rows of a `Matrix3x3`.
|
|
354
|
-
*
|
|
355
|
-
* @param m - The matrix to reverse the rows of.
|
|
356
|
-
* @returns A new `Matrix3x3` instance with the rows reversed.
|
|
357
|
-
* @since 1.0.0
|
|
358
|
-
*/
|
|
359
|
-
declare const reverseRows: (m: Matrix3x3) => Matrix3x3;
|
|
360
|
-
/**
|
|
361
|
-
* Reverses the columns of a `Matrix3x3`.
|
|
362
|
-
*
|
|
363
|
-
* @param m - The matrix to reverse the columns of.
|
|
364
|
-
* @returns A new `Matrix3x3` instance with the columns reversed.
|
|
365
|
-
* @since 1.0.0
|
|
366
|
-
*/
|
|
367
|
-
declare const reverseColumns: (m: Matrix3x3) => Matrix3x3;
|
|
368
|
-
|
|
369
|
-
export { columnVector, determinant, fromColumns, fromRows, isMatrix3x3, matrix3x3, minor, reverseColumns, reverseRows, rowVector, setColumn, setRow, solveSystem, toColumns, toRows, transpose, vectorProductLeft, vectorProductRight };
|
|
370
|
-
export type { Matrix3x3, Matrix3x3Coordinate };
|