@lakuna/umath 1.3.4 → 1.3.6
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/LICENSE +1 -1
- package/README.md +7 -9
- package/dist/algorithms/combinations.d.ts +7 -0
- package/dist/algorithms/combinations.d.ts.map +1 -1
- package/dist/algorithms/combinations.js +8 -1
- package/dist/algorithms/combinations.js.map +1 -1
- package/dist/algorithms/degreesToRadians.d.ts +7 -0
- package/dist/algorithms/degreesToRadians.d.ts.map +1 -1
- package/dist/algorithms/degreesToRadians.js +7 -0
- package/dist/algorithms/degreesToRadians.js.map +1 -1
- package/dist/algorithms/factorial.d.ts +6 -0
- package/dist/algorithms/factorial.d.ts.map +1 -1
- package/dist/algorithms/factorial.js +15 -5
- package/dist/algorithms/factorial.js.map +1 -1
- package/dist/algorithms/fibonacci.d.ts +6 -1
- package/dist/algorithms/fibonacci.d.ts.map +1 -1
- package/dist/algorithms/fibonacci.js +6 -1
- package/dist/algorithms/fibonacci.js.map +1 -1
- package/dist/algorithms/greatestCommonDivisor.d.ts +14 -0
- package/dist/algorithms/greatestCommonDivisor.d.ts.map +1 -1
- package/dist/algorithms/greatestCommonDivisor.js +7 -9
- package/dist/algorithms/greatestCommonDivisor.js.map +1 -1
- package/dist/algorithms/hypergeometricPmf.d.ts +9 -0
- package/dist/algorithms/hypergeometricPmf.d.ts.map +1 -1
- package/dist/algorithms/hypergeometricPmf.js +10 -1
- package/dist/algorithms/hypergeometricPmf.js.map +1 -1
- package/dist/algorithms/isPrime.d.ts +6 -0
- package/dist/algorithms/isPrime.d.ts.map +1 -1
- package/dist/algorithms/isPrime.js +8 -1
- package/dist/algorithms/isPrime.js.map +1 -1
- package/dist/algorithms/permutations.d.ts +7 -0
- package/dist/algorithms/permutations.d.ts.map +1 -1
- package/dist/algorithms/permutations.js +8 -1
- package/dist/algorithms/permutations.js.map +1 -1
- package/dist/algorithms/primeFactorization.d.ts +7 -1
- package/dist/algorithms/primeFactorization.d.ts.map +1 -1
- package/dist/algorithms/primeFactorization.js +10 -3
- package/dist/algorithms/primeFactorization.js.map +1 -1
- package/dist/algorithms/radiansToDegrees.d.ts +7 -0
- package/dist/algorithms/radiansToDegrees.d.ts.map +1 -1
- package/dist/algorithms/radiansToDegrees.js +7 -0
- package/dist/algorithms/radiansToDegrees.js.map +1 -1
- package/dist/algorithms/summation.d.ts +8 -0
- package/dist/algorithms/summation.d.ts.map +1 -1
- package/dist/algorithms/summation.js +9 -0
- package/dist/algorithms/summation.js.map +1 -1
- package/dist/index.d.ts +32 -33
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +27 -27
- package/dist/index.js.map +1 -1
- package/dist/linalg/DualQuaternion.d.ts +460 -83
- package/dist/linalg/DualQuaternion.d.ts.map +1 -1
- package/dist/linalg/DualQuaternion.js +514 -133
- package/dist/linalg/DualQuaternion.js.map +1 -1
- package/dist/linalg/Matrix.d.ts +80 -12
- package/dist/linalg/Matrix.d.ts.map +1 -1
- package/dist/linalg/Matrix2.d.ts +337 -52
- package/dist/linalg/Matrix2.d.ts.map +1 -1
- package/dist/linalg/Matrix2.js +345 -61
- package/dist/linalg/Matrix2.js.map +1 -1
- package/dist/linalg/Matrix3.d.ts +470 -72
- package/dist/linalg/Matrix3.d.ts.map +1 -1
- package/dist/linalg/Matrix3.js +488 -94
- package/dist/linalg/Matrix3.js.map +1 -1
- package/dist/linalg/Matrix4.d.ts +842 -137
- package/dist/linalg/Matrix4.d.ts.map +1 -1
- package/dist/linalg/Matrix4.js +896 -175
- package/dist/linalg/Matrix4.js.map +1 -1
- package/dist/linalg/Quaternion.d.ts +395 -70
- package/dist/linalg/Quaternion.d.ts.map +1 -1
- package/dist/linalg/Quaternion.js +416 -70
- package/dist/linalg/Quaternion.js.map +1 -1
- package/dist/linalg/SlowMatrix.d.ts +79 -9
- package/dist/linalg/SlowMatrix.d.ts.map +1 -1
- package/dist/linalg/SlowMatrix.js +147 -27
- package/dist/linalg/SlowMatrix.js.map +1 -1
- package/dist/linalg/SlowSquareMatrix.d.ts +58 -3
- package/dist/linalg/SlowSquareMatrix.d.ts.map +1 -1
- package/dist/linalg/SlowSquareMatrix.js +111 -21
- package/dist/linalg/SlowSquareMatrix.js.map +1 -1
- package/dist/linalg/SquareMatrix.d.ts +26 -3
- package/dist/linalg/SquareMatrix.d.ts.map +1 -1
- package/dist/linalg/Vector.d.ts +148 -24
- package/dist/linalg/Vector.d.ts.map +1 -1
- package/dist/linalg/Vector2.d.ts +484 -84
- package/dist/linalg/Vector2.d.ts.map +1 -1
- package/dist/linalg/Vector2.js +487 -71
- package/dist/linalg/Vector2.js.map +1 -1
- package/dist/linalg/Vector3.d.ts +582 -98
- package/dist/linalg/Vector3.d.ts.map +1 -1
- package/dist/linalg/Vector3.js +625 -134
- package/dist/linalg/Vector3.js.map +1 -1
- package/dist/linalg/Vector4.d.ts +450 -75
- package/dist/linalg/Vector4.d.ts.map +1 -1
- package/dist/linalg/Vector4.js +447 -62
- package/dist/linalg/Vector4.js.map +1 -1
- package/dist/types/AxisAngle.d.ts +4 -1
- package/dist/types/AxisAngle.d.ts.map +1 -1
- package/dist/types/FieldOfView.d.ts +5 -0
- package/dist/types/FieldOfView.d.ts.map +1 -1
- package/dist/utility/BigNumber.d.ts +41 -8
- package/dist/utility/BigNumber.d.ts.map +1 -1
- package/dist/utility/BigNumber.js +47 -5
- package/dist/utility/BigNumber.js.map +1 -1
- package/dist/utility/MagnitudeError.d.ts +5 -0
- package/dist/utility/MagnitudeError.d.ts.map +1 -1
- package/dist/utility/MagnitudeError.js +6 -1
- package/dist/utility/MagnitudeError.js.map +1 -1
- package/dist/utility/MatrixSizeError.d.ts +5 -0
- package/dist/utility/MatrixSizeError.d.ts.map +1 -1
- package/dist/utility/MatrixSizeError.js +5 -0
- package/dist/utility/MatrixSizeError.js.map +1 -1
- package/dist/utility/PartialMatrixError.d.ts +5 -0
- package/dist/utility/PartialMatrixError.d.ts.map +1 -1
- package/dist/utility/PartialMatrixError.js +5 -0
- package/dist/utility/PartialMatrixError.js.map +1 -1
- package/dist/utility/SingularMatrixError.d.ts +8 -0
- package/dist/utility/SingularMatrixError.d.ts.map +1 -1
- package/dist/utility/SingularMatrixError.js +8 -0
- package/dist/utility/SingularMatrixError.js.map +1 -1
- package/dist/utility/epsilon.d.ts +1 -0
- package/dist/utility/epsilon.d.ts.map +1 -1
- package/dist/utility/epsilon.js +1 -0
- package/dist/utility/epsilon.js.map +1 -1
- package/package.json +20 -51
- package/src/algorithms/combinations.ts +4 -4
- package/src/algorithms/degreesToRadians.ts +3 -3
- package/src/algorithms/factorial.ts +13 -8
- package/src/algorithms/fibonacci.ts +3 -3
- package/src/algorithms/greatestCommonDivisor.ts +15 -19
- package/src/algorithms/hypergeometricPmf.ts +5 -6
- package/src/algorithms/isPrime.ts +4 -4
- package/src/algorithms/permutations.ts +4 -4
- package/src/algorithms/primeFactorization.ts +9 -9
- package/src/algorithms/radiansToDegrees.ts +3 -3
- package/src/algorithms/summation.ts +5 -5
- package/src/index.ts +35 -33
- package/src/linalg/DualQuaternion.ts +558 -804
- package/src/linalg/Matrix.ts +35 -36
- package/src/linalg/Matrix2.ts +277 -413
- package/src/linalg/Matrix3.ts +532 -737
- package/src/linalg/Matrix4.ts +1078 -1604
- package/src/linalg/Quaternion.ts +415 -690
- package/src/linalg/SlowMatrix.ts +118 -69
- package/src/linalg/SlowSquareMatrix.ts +85 -56
- package/src/linalg/SquareMatrix.ts +7 -7
- package/src/linalg/Vector.ts +71 -70
- package/src/linalg/Vector2.ts +380 -576
- package/src/linalg/Vector3.ts +544 -840
- package/src/linalg/Vector4.ts +383 -549
- package/src/types/AxisAngle.ts +1 -1
- package/src/utility/BigNumber.ts +33 -42
- package/src/utility/MagnitudeError.ts +4 -4
- package/src/utility/MatrixSizeError.ts +2 -3
- package/src/utility/PartialMatrixError.ts +2 -3
- package/src/utility/SingularMatrixError.ts +2 -2
- package/src/utility/epsilon.ts +1 -4
- package/dist/types/IntegerRepresentation.d.ts +0 -2
- package/dist/types/IntegerRepresentation.d.ts.map +0 -1
- package/dist/types/IntegerRepresentation.js +0 -2
- package/dist/types/IntegerRepresentation.js.map +0 -1
- package/src/types/IntegerRepresentation.ts +0 -2
package/dist/linalg/Matrix2.js
CHANGED
|
@@ -1,32 +1,65 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import SingularMatrixError from "../utility/SingularMatrixError.js";
|
|
2
|
+
import epsilon from "../utility/epsilon.js";
|
|
3
|
+
/**
|
|
4
|
+
* Create a 2x2 matrix-like object.
|
|
5
|
+
* @returns A 2x2 matrix-like object.
|
|
6
|
+
*/
|
|
7
|
+
export const createMatrix2Like = () => {
|
|
4
8
|
return new Float32Array(4);
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Create a transformation matrix that represents a rotation by the given angle around the Z-axis.
|
|
12
|
+
* @param r - The angle in radians.
|
|
13
|
+
* @param out - The matrix to store the result in.
|
|
14
|
+
* @returns The transformation matrix.
|
|
15
|
+
* @see [Rotation matrix](https://en.wikipedia.org/wiki/Rotation_matrix)
|
|
16
|
+
*/
|
|
17
|
+
export const fromRotation = (r, out) => {
|
|
18
|
+
const s = Math.sin(r);
|
|
19
|
+
const c = Math.cos(r);
|
|
9
20
|
out[0] = c;
|
|
10
21
|
out[1] = s;
|
|
11
22
|
out[2] = -s;
|
|
12
23
|
out[3] = c;
|
|
13
24
|
return out;
|
|
14
|
-
}
|
|
15
|
-
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Create a transformation matrix that represents a scaling by the given vector.
|
|
28
|
+
* @param v - The scaling vector.
|
|
29
|
+
* @param out - The matrix to store the result in.
|
|
30
|
+
* @returns The transformation matrix.
|
|
31
|
+
* @see [Transformation matrix](https://en.wikipedia.org/wiki/Transformation_matrix)
|
|
32
|
+
*/
|
|
33
|
+
export const fromScaling = (vector, out) => {
|
|
16
34
|
out[0] = vector[0];
|
|
17
35
|
out[1] = 0;
|
|
18
36
|
out[2] = 0;
|
|
19
37
|
out[3] = vector[1];
|
|
20
38
|
return out;
|
|
21
|
-
}
|
|
22
|
-
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Create a two-by-two matrix with the given values.
|
|
42
|
+
* @param c0r0 - The value in the first column and first row.
|
|
43
|
+
* @param c0r1 - The value in the first column and second row.
|
|
44
|
+
* @param c1r0 - The value in the second column and first row.
|
|
45
|
+
* @param c1r1 - The value in the second column and second row.
|
|
46
|
+
* @param out - The matrix to store the result in.
|
|
47
|
+
* @returns The matrix.
|
|
48
|
+
*/
|
|
49
|
+
export const fromValues = (c0r0, c0r1, c1r0, c1r1, out) => {
|
|
23
50
|
out[0] = c0r0;
|
|
24
51
|
out[1] = c0r1;
|
|
25
52
|
out[2] = c1r0;
|
|
26
53
|
out[3] = c1r1;
|
|
27
54
|
return out;
|
|
28
|
-
}
|
|
29
|
-
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Determine whether or not two matrices are roughly equivalent.
|
|
58
|
+
* @param a - The first matrix.
|
|
59
|
+
* @param b - The second matrix.
|
|
60
|
+
* @returns Whether or not the matrices are equivalent.
|
|
61
|
+
*/
|
|
62
|
+
export const equals = (a, b) => {
|
|
30
63
|
const a0 = a[0];
|
|
31
64
|
const a1 = a[1];
|
|
32
65
|
const a2 = a[2];
|
|
@@ -39,36 +72,77 @@ export function equals(a, b) {
|
|
|
39
72
|
Math.abs(a1 - b1) <= epsilon * Math.max(1, Math.abs(a1), Math.abs(b1)) &&
|
|
40
73
|
Math.abs(a2 - b2) <= epsilon * Math.max(1, Math.abs(a2), Math.abs(b2)) &&
|
|
41
74
|
Math.abs(a3 - b3) <= epsilon * Math.max(1, Math.abs(a3), Math.abs(b3)));
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* Determine whether or not two matrices are exactly equivalent.
|
|
78
|
+
* @param a - The first matrix.
|
|
79
|
+
* @param b - The second matrix.
|
|
80
|
+
* @returns Whether the matrices are equivalent.
|
|
81
|
+
*/
|
|
82
|
+
export const exactEquals = (a, b) => {
|
|
83
|
+
return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3];
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* Add two matrices.
|
|
87
|
+
* @param a - The augend.
|
|
88
|
+
* @param b - The addend.
|
|
89
|
+
* @param out - The matrix to store the result in.
|
|
90
|
+
* @returns The sum.
|
|
91
|
+
* @see [Matrix addition](https://en.wikipedia.org/wiki/Matrix_addition)
|
|
92
|
+
*/
|
|
93
|
+
export const add = (a, b, out) => {
|
|
47
94
|
out[0] = a[0] + b[0];
|
|
48
95
|
out[1] = a[1] + b[1];
|
|
49
96
|
out[2] = a[2] + b[2];
|
|
50
97
|
out[3] = a[3] + b[3];
|
|
51
98
|
return out;
|
|
52
|
-
}
|
|
53
|
-
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* Calculate the adjugate of a matrix.
|
|
102
|
+
* @param matrix - The matrix.
|
|
103
|
+
* @param out - The matrix to store the result in.
|
|
104
|
+
* @returns The adjugate of the matrix.
|
|
105
|
+
* @see [Adjugate matrix](https://en.wikipedia.org/wiki/Adjugate_matrix)
|
|
106
|
+
*/
|
|
107
|
+
export const adjoint = (matrix, out) => {
|
|
54
108
|
const a0 = matrix[0];
|
|
55
109
|
out[0] = matrix[3];
|
|
56
110
|
out[1] = -matrix[1];
|
|
57
111
|
out[2] = -matrix[2];
|
|
58
112
|
out[3] = a0;
|
|
59
113
|
return out;
|
|
60
|
-
}
|
|
61
|
-
|
|
114
|
+
};
|
|
115
|
+
/**
|
|
116
|
+
* Copy the values from one matrix into another.
|
|
117
|
+
* @param matrix - The matrix to copy.
|
|
118
|
+
* @param out - The matrix to store the result in.
|
|
119
|
+
* @returns The copy matrix.
|
|
120
|
+
*/
|
|
121
|
+
export const copy = (matrix, out) => {
|
|
62
122
|
out[0] = matrix[0];
|
|
63
123
|
out[1] = matrix[1];
|
|
64
124
|
out[2] = matrix[2];
|
|
65
125
|
out[3] = matrix[3];
|
|
66
126
|
return out;
|
|
67
|
-
}
|
|
68
|
-
|
|
127
|
+
};
|
|
128
|
+
/**
|
|
129
|
+
* Calculate the Frobenius norm of a matrix.
|
|
130
|
+
* @param matrix - The matrix.
|
|
131
|
+
* @returns The Frobenius norm.
|
|
132
|
+
* @see [Matrix norm](https://en.wikipedia.org/wiki/Matrix_norm)
|
|
133
|
+
*/
|
|
134
|
+
export const frob = (matrix) => {
|
|
69
135
|
return Math.hypot(matrix[0], matrix[1], matrix[2], matrix[3]);
|
|
70
|
-
}
|
|
71
|
-
|
|
136
|
+
};
|
|
137
|
+
/**
|
|
138
|
+
* Multiply one matrix by another.
|
|
139
|
+
* @param a - The multiplicand.
|
|
140
|
+
* @param b - The multiplier.
|
|
141
|
+
* @param out - The matrix to store the result in.
|
|
142
|
+
* @returns The product.
|
|
143
|
+
* @see [Matrix multiplication](https://en.wikipedia.org/wiki/Matrix_multiplication)
|
|
144
|
+
*/
|
|
145
|
+
export const multiply = (a, b, out) => {
|
|
72
146
|
const a0 = a[0];
|
|
73
147
|
const a1 = a[1];
|
|
74
148
|
const a2 = a[2];
|
|
@@ -82,30 +156,63 @@ export function multiply(a, b, out) {
|
|
|
82
156
|
out[2] = a0 * b2 + a2 * b3;
|
|
83
157
|
out[3] = a1 * b2 + a3 * b3;
|
|
84
158
|
return out;
|
|
85
|
-
}
|
|
86
|
-
|
|
159
|
+
};
|
|
160
|
+
/**
|
|
161
|
+
* Multiply a matrix by a scalar value.
|
|
162
|
+
* @param matrix - The multiplicand.
|
|
163
|
+
* @param scalar - The multiplier.
|
|
164
|
+
* @param out - The matrix to store the result in.
|
|
165
|
+
* @returns The product.
|
|
166
|
+
* @see [Matrix multiplication](https://en.wikipedia.org/wiki/Matrix_multiplication)
|
|
167
|
+
*/
|
|
168
|
+
export const multiplyScalar = (matrix, scalar, out) => {
|
|
87
169
|
out[0] = matrix[0] * scalar;
|
|
88
170
|
out[1] = matrix[1] * scalar;
|
|
89
171
|
out[2] = matrix[2] * scalar;
|
|
90
172
|
out[3] = matrix[3] * scalar;
|
|
91
173
|
return out;
|
|
92
|
-
}
|
|
93
|
-
|
|
174
|
+
};
|
|
175
|
+
/**
|
|
176
|
+
* Add a matrix to another after multiplying the other by a scalar.
|
|
177
|
+
* @param a - The augend.
|
|
178
|
+
* @param b - The addend.
|
|
179
|
+
* @param scalar - The multiplier.
|
|
180
|
+
* @param out - The matrix to store the result in.
|
|
181
|
+
* @returns The sum.
|
|
182
|
+
* @see [Matrix addition](https://en.wikipedia.org/wiki/Matrix_addition)
|
|
183
|
+
* @see [Matrix multiplication](https://en.wikipedia.org/wiki/Matrix_multiplication)
|
|
184
|
+
*/
|
|
185
|
+
export const multiplyScalarAndAdd = (a, b, scalar, out) => {
|
|
94
186
|
out[0] = a[0] + b[0] * scalar;
|
|
95
187
|
out[1] = a[1] + b[1] * scalar;
|
|
96
188
|
out[2] = a[2] + b[2] * scalar;
|
|
97
189
|
out[3] = a[3] + b[3] * scalar;
|
|
98
190
|
return out;
|
|
99
|
-
}
|
|
100
|
-
|
|
191
|
+
};
|
|
192
|
+
/**
|
|
193
|
+
* Subtract one matrix from another.
|
|
194
|
+
* @param a - The minuend.
|
|
195
|
+
* @param b - The subtrahend.
|
|
196
|
+
* @param out - The matrix to store the result in.
|
|
197
|
+
* @returns The difference.
|
|
198
|
+
* @see [Matrix addition](https://en.wikipedia.org/wiki/Matrix_addition)
|
|
199
|
+
*/
|
|
200
|
+
export const subtract = (a, b, out) => {
|
|
101
201
|
out[0] = a[0] - b[0];
|
|
102
202
|
out[1] = a[1] - b[1];
|
|
103
203
|
out[2] = a[2] - b[2];
|
|
104
204
|
out[3] = a[3] - b[3];
|
|
105
205
|
return out;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
|
|
206
|
+
};
|
|
207
|
+
/**
|
|
208
|
+
* Transpose a matrix.
|
|
209
|
+
* @param matrix - The matrix.
|
|
210
|
+
* @param out - The matrix to store the result in.
|
|
211
|
+
* @returns The transpose of the matrix.
|
|
212
|
+
* @see [Transpose](https://en.wikipedia.org/wiki/Transpose)
|
|
213
|
+
*/
|
|
214
|
+
export const transpose = (matrix, out) => {
|
|
215
|
+
if (out === matrix) {
|
|
109
216
|
const a1 = matrix[1];
|
|
110
217
|
out[1] = matrix[2];
|
|
111
218
|
out[2] = a1;
|
|
@@ -117,48 +224,82 @@ export function transpose(matrix, out) {
|
|
|
117
224
|
out[3] = matrix[3];
|
|
118
225
|
}
|
|
119
226
|
return out;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
227
|
+
};
|
|
228
|
+
/**
|
|
229
|
+
* Calculate the determinant of a matrix.
|
|
230
|
+
* @param matrix- The matrix.
|
|
231
|
+
* @returns The determinant.
|
|
232
|
+
* @see [Determinant](https://en.wikipedia.org/wiki/Determinant)
|
|
233
|
+
*/
|
|
234
|
+
export const determinant = (matrix) => {
|
|
235
|
+
return matrix[0] * matrix[3] - matrix[2] * matrix[1];
|
|
236
|
+
};
|
|
237
|
+
/**
|
|
238
|
+
* Reset a matrix to identity.
|
|
239
|
+
* @param out - The matrix to store the result in.
|
|
240
|
+
* @returns The matrix.
|
|
241
|
+
* @see [Identity matrix](https://en.wikipedia.org/wiki/Identity_matrix)
|
|
242
|
+
*/
|
|
243
|
+
export const identity = (out) => {
|
|
126
244
|
out[0] = 1;
|
|
127
245
|
out[1] = 0;
|
|
128
246
|
out[2] = 0;
|
|
129
247
|
out[3] = 1;
|
|
130
248
|
return out;
|
|
131
|
-
}
|
|
132
|
-
|
|
249
|
+
};
|
|
250
|
+
/**
|
|
251
|
+
* Invert a matrix.
|
|
252
|
+
* @param matrix - The matrix.
|
|
253
|
+
* @param out - The matrix to store the result in.
|
|
254
|
+
* @returns The inverted matrix.
|
|
255
|
+
* @see [Invertible matrix](https://en.wikipedia.org/wiki/Invertible_matrix)
|
|
256
|
+
*/
|
|
257
|
+
export const invert = (matrix, out) => {
|
|
133
258
|
const a0 = matrix[0];
|
|
134
259
|
const a1 = matrix[1];
|
|
135
260
|
const a2 = matrix[2];
|
|
136
261
|
const a3 = matrix[3];
|
|
137
|
-
let
|
|
138
|
-
if (!
|
|
262
|
+
let det = a0 * a3 - a2 * a1;
|
|
263
|
+
if (!det) {
|
|
139
264
|
throw new SingularMatrixError();
|
|
140
265
|
}
|
|
141
|
-
|
|
142
|
-
out[0] = a3 *
|
|
143
|
-
out[1] = -a1 *
|
|
144
|
-
out[2] = -a2 *
|
|
145
|
-
out[3] = a0 *
|
|
266
|
+
det = 1 / det;
|
|
267
|
+
out[0] = a3 * det;
|
|
268
|
+
out[1] = -a1 * det;
|
|
269
|
+
out[2] = -a2 * det;
|
|
270
|
+
out[3] = a0 * det;
|
|
146
271
|
return out;
|
|
147
|
-
}
|
|
148
|
-
|
|
272
|
+
};
|
|
273
|
+
/**
|
|
274
|
+
* Rotate a matrix by the given angle.
|
|
275
|
+
* @param matrix - The matrix.
|
|
276
|
+
* @param r - The angle in radians.
|
|
277
|
+
* @param out - The matrix to store the result in.
|
|
278
|
+
* @returns The rotated matrix.
|
|
279
|
+
* @see [Rotation matrix](https://en.wikipedia.org/wiki/Rotation_matrix)
|
|
280
|
+
*/
|
|
281
|
+
export const rotate = (matrix, r, out) => {
|
|
149
282
|
const a0 = matrix[0];
|
|
150
283
|
const a1 = matrix[1];
|
|
151
284
|
const a2 = matrix[2];
|
|
152
285
|
const a3 = matrix[3];
|
|
153
|
-
const s = Math.sin(
|
|
154
|
-
const c = Math.cos(
|
|
286
|
+
const s = Math.sin(r);
|
|
287
|
+
const c = Math.cos(r);
|
|
155
288
|
out[0] = a0 * c + a2 * s;
|
|
156
289
|
out[1] = a1 * c + a3 * s;
|
|
157
290
|
out[2] = a0 * -s + a2 * c;
|
|
158
291
|
out[3] = a1 * -s + a3 * c;
|
|
159
292
|
return out;
|
|
160
|
-
}
|
|
161
|
-
|
|
293
|
+
};
|
|
294
|
+
/**
|
|
295
|
+
* Scale a matrix by the given vector.
|
|
296
|
+
* @param matrix - The matrix.
|
|
297
|
+
* @param vector - The scaling vector.
|
|
298
|
+
* @param out - The matrix to store the result in.
|
|
299
|
+
* @returns The scaled matrix.
|
|
300
|
+
* @see [Transformation matrix](https://en.wikipedia.org/wiki/Transformation_matrix)
|
|
301
|
+
*/
|
|
302
|
+
export const scale = (matrix, vector, out) => {
|
|
162
303
|
const v0 = vector[0];
|
|
163
304
|
const v1 = vector[1];
|
|
164
305
|
out[0] = matrix[0] * v0;
|
|
@@ -166,17 +307,48 @@ export function scale(matrix, vector, out) {
|
|
|
166
307
|
out[2] = matrix[2] * v1;
|
|
167
308
|
out[3] = matrix[3] * v1;
|
|
168
309
|
return out;
|
|
169
|
-
}
|
|
310
|
+
};
|
|
311
|
+
/**
|
|
312
|
+
* A two-by-two matrix.
|
|
313
|
+
* @see [Matrix](https://en.wikipedia.org/wiki/Matrix_(mathematics))
|
|
314
|
+
*/
|
|
170
315
|
export default class Matrix2 extends Float32Array {
|
|
171
|
-
|
|
172
|
-
|
|
316
|
+
/**
|
|
317
|
+
* Create a transformation matrix that represents a rotation by the given angle around the Z-axis.
|
|
318
|
+
* @param r - The angle in radians.
|
|
319
|
+
* @param out - The matrix to store the result in.
|
|
320
|
+
* @returns The transformation matrix.
|
|
321
|
+
* @see [Rotation matrix](https://en.wikipedia.org/wiki/Rotation_matrix)
|
|
322
|
+
*/
|
|
323
|
+
static fromRotation(r, out = new Matrix2()) {
|
|
324
|
+
return fromRotation(r, out);
|
|
173
325
|
}
|
|
326
|
+
/**
|
|
327
|
+
* Create a transformation matrix that represents a scaling by the given vector.
|
|
328
|
+
* @param vector - The scaling vector.
|
|
329
|
+
* @param out - The matrix to store the result in.
|
|
330
|
+
* @returns The transformation matrix.
|
|
331
|
+
* @see [Transformation matrix](https://en.wikipedia.org/wiki/Transformation_matrix)
|
|
332
|
+
*/
|
|
174
333
|
static fromScaling(vector, out = new Matrix2()) {
|
|
175
334
|
return fromScaling(vector, out);
|
|
176
335
|
}
|
|
336
|
+
/**
|
|
337
|
+
* Create a two-by-two matrix with the given values.
|
|
338
|
+
* @param c0r0 - The value in the first column and first row.
|
|
339
|
+
* @param c0r1 - The value in the first column and second row.
|
|
340
|
+
* @param c1r0 - The value in the second column and first row.
|
|
341
|
+
* @param c1r1 - The value in the second column and second row.
|
|
342
|
+
* @param out - The matrix to store the result in.
|
|
343
|
+
* @returns The matrix.
|
|
344
|
+
*/
|
|
177
345
|
static fromValues(c0r0, c0r1, c1r0, c1r1, out = new Matrix2()) {
|
|
178
346
|
return fromValues(c0r0, c0r1, c1r0, c1r1, out);
|
|
179
347
|
}
|
|
348
|
+
/**
|
|
349
|
+
* Create a two-by-two identity matrix.
|
|
350
|
+
* @see [Identity matrix](https://en.wikipedia.org/wiki/Identity_matrix)
|
|
351
|
+
*/
|
|
180
352
|
constructor() {
|
|
181
353
|
super(4);
|
|
182
354
|
this[0] = 1;
|
|
@@ -184,56 +356,168 @@ export default class Matrix2 extends Float32Array {
|
|
|
184
356
|
this.width = 2;
|
|
185
357
|
this.height = 2;
|
|
186
358
|
}
|
|
359
|
+
/** The value in the first column and first row. */
|
|
360
|
+
0;
|
|
361
|
+
/** The value in the first column and second row. */
|
|
362
|
+
1;
|
|
363
|
+
/** The value in the second column and first row. */
|
|
364
|
+
2;
|
|
365
|
+
/** The value in the second column and second row. */
|
|
366
|
+
3;
|
|
367
|
+
/** The number of columns in this matrix. */
|
|
187
368
|
width;
|
|
369
|
+
/** The number of rows in this matrix. */
|
|
188
370
|
height;
|
|
371
|
+
/**
|
|
372
|
+
* Determine whether or not this matrix is roughly equivalent to another.
|
|
373
|
+
* @param matrix - The other matrix.
|
|
374
|
+
* @returns Whether the matrices are equivalent.
|
|
375
|
+
*/
|
|
189
376
|
equals(matrix) {
|
|
190
377
|
return equals(this, matrix);
|
|
191
378
|
}
|
|
379
|
+
/**
|
|
380
|
+
* Determine whether or not this matrix is exactly equivalent to another.
|
|
381
|
+
* @param matrix - The other matrix.
|
|
382
|
+
* @returns Whether the matrices are equivalent.
|
|
383
|
+
*/
|
|
192
384
|
exactEquals(matrix) {
|
|
193
385
|
return exactEquals(this, matrix);
|
|
194
386
|
}
|
|
387
|
+
/**
|
|
388
|
+
* Add another matrix to this one.
|
|
389
|
+
* @param matrix - The other matrix.
|
|
390
|
+
* @param out - The matrix to store the result in.
|
|
391
|
+
* @returns The sum of the matrices.
|
|
392
|
+
* @see [Matrix addition](https://en.wikipedia.org/wiki/Matrix_addition)
|
|
393
|
+
*/
|
|
195
394
|
add(matrix, out = new Matrix2()) {
|
|
196
395
|
return add(this, matrix, out);
|
|
197
396
|
}
|
|
397
|
+
/**
|
|
398
|
+
* Calculate the adjugate of this matrix.
|
|
399
|
+
* @param out - The matrix to store the result in.
|
|
400
|
+
* @returns The adjugate of this matrix.
|
|
401
|
+
* @see [Adjugate matrix](https://en.wikipedia.org/wiki/Adjugate_matrix)
|
|
402
|
+
*/
|
|
198
403
|
adjoint(out = new Matrix2()) {
|
|
199
404
|
return adjoint(this, out);
|
|
200
405
|
}
|
|
406
|
+
/**
|
|
407
|
+
* Copy the values from this matrix to another one.
|
|
408
|
+
* @param out - The matrix to store the result in.
|
|
409
|
+
* @returns The copy.
|
|
410
|
+
*/
|
|
201
411
|
clone(out = new Matrix2()) {
|
|
202
412
|
return copy(this, out);
|
|
203
413
|
}
|
|
414
|
+
/**
|
|
415
|
+
* Copy the values of another matrix into this one.
|
|
416
|
+
* @param matrix - The matrix to copy.
|
|
417
|
+
* @returns This matrix.
|
|
418
|
+
*/
|
|
204
419
|
copy(matrix) {
|
|
205
420
|
return copy(matrix, this);
|
|
206
421
|
}
|
|
422
|
+
/**
|
|
423
|
+
* Get the Frobenius norm of this matrix.
|
|
424
|
+
* @see [Matrix norm](https://en.wikipedia.org/wiki/Matrix_norm)
|
|
425
|
+
*/
|
|
207
426
|
get frob() {
|
|
208
427
|
return frob(this);
|
|
209
428
|
}
|
|
429
|
+
/**
|
|
430
|
+
* Multiply this matrix by another.
|
|
431
|
+
* @param matrix - The other matrix.
|
|
432
|
+
* @param out - The matrix to store the result in.
|
|
433
|
+
* @returns The product of the matrices.
|
|
434
|
+
* @see [Matrix multiplication](https://en.wikipedia.org/wiki/Matrix_multiplication)
|
|
435
|
+
*/
|
|
210
436
|
multiply(matrix, out = new Matrix2()) {
|
|
211
437
|
return multiply(this, matrix, out);
|
|
212
438
|
}
|
|
439
|
+
/**
|
|
440
|
+
* Multiply this matrix by a scalar value.
|
|
441
|
+
* @param scalar - The scalar value.
|
|
442
|
+
* @param out - The matrix to store the result in.
|
|
443
|
+
* @returns The product of the matrix and the scalar value.
|
|
444
|
+
* @see [Matrix multiplication](https://en.wikipedia.org/wiki/Matrix_multiplication)
|
|
445
|
+
*/
|
|
213
446
|
multiplyScalar(scalar, out = new Matrix2()) {
|
|
214
447
|
return multiplyScalar(this, scalar, out);
|
|
215
448
|
}
|
|
449
|
+
/**
|
|
450
|
+
* Add this matrix to another after multiplying the other by a scalar.
|
|
451
|
+
* @param matrix - The other matrix.
|
|
452
|
+
* @param scalar - The scalar.
|
|
453
|
+
* @param out - The matrix to store the result in.
|
|
454
|
+
* @returns The sum.
|
|
455
|
+
* @see [Matrix addition](https://en.wikipedia.org/wiki/Matrix_addition)
|
|
456
|
+
* @see [Matrix multiplication](https://en.wikipedia.org/wiki/Matrix_multiplication)
|
|
457
|
+
*/
|
|
216
458
|
multiplyScalarAndAdd(matrix, scalar, out = new Matrix2()) {
|
|
217
459
|
return multiplyScalarAndAdd(this, matrix, scalar, out);
|
|
218
460
|
}
|
|
461
|
+
/**
|
|
462
|
+
* Subtract another matrix from this one.
|
|
463
|
+
* @param matrix - The other matrix.
|
|
464
|
+
* @param out - The matrix to store the result in.
|
|
465
|
+
* @returns The difference between the matrices.
|
|
466
|
+
* @see [Matrix addition](https://en.wikipedia.org/wiki/Matrix_addition)
|
|
467
|
+
*/
|
|
219
468
|
subtract(matrix, out = new Matrix2()) {
|
|
220
469
|
return subtract(this, matrix, out);
|
|
221
470
|
}
|
|
471
|
+
/**
|
|
472
|
+
* Transpose this matrix.
|
|
473
|
+
* @param out - The matrix to store the result in.
|
|
474
|
+
* @returns The transpose of this matrix.
|
|
475
|
+
* @see [Transpose](https://en.wikipedia.org/wiki/Transpose)
|
|
476
|
+
*/
|
|
222
477
|
transpose(out = new Matrix2()) {
|
|
223
478
|
return transpose(this, out);
|
|
224
479
|
}
|
|
480
|
+
/**
|
|
481
|
+
* Get the determinant of this matrix.
|
|
482
|
+
* @see [Determinant](https://en.wikipedia.org/wiki/Determinant)
|
|
483
|
+
*/
|
|
225
484
|
get determinant() {
|
|
226
485
|
return determinant(this);
|
|
227
486
|
}
|
|
487
|
+
/**
|
|
488
|
+
* Reset this matrix to identity.
|
|
489
|
+
* @returns This matrix.
|
|
490
|
+
* @see [Identity matrix](https://en.wikipedia.org/wiki/Identity_matrix)
|
|
491
|
+
*/
|
|
228
492
|
identity() {
|
|
229
493
|
return identity(this);
|
|
230
494
|
}
|
|
495
|
+
/**
|
|
496
|
+
* Invert this matrix.
|
|
497
|
+
* @param out - The matrix to store the result in.
|
|
498
|
+
* @returns The inverted matrix.
|
|
499
|
+
* @see [Invertible matrix](https://en.wikipedia.org/wiki/Invertible_matrix)
|
|
500
|
+
*/
|
|
231
501
|
invert(out = new Matrix2()) {
|
|
232
502
|
return invert(this, out);
|
|
233
503
|
}
|
|
234
|
-
|
|
235
|
-
|
|
504
|
+
/**
|
|
505
|
+
* Rotate this matrix by the given angle.
|
|
506
|
+
* @param r - The angle in radians.
|
|
507
|
+
* @param out - The matrix to store the result in.
|
|
508
|
+
* @returns The rotated matrix.
|
|
509
|
+
* @see [Rotation matrix](https://en.wikipedia.org/wiki/Rotation_matrix)
|
|
510
|
+
*/
|
|
511
|
+
rotate(r, out = new Matrix2()) {
|
|
512
|
+
return rotate(this, r, out);
|
|
236
513
|
}
|
|
514
|
+
/**
|
|
515
|
+
* Scale this matrix by the given vector.
|
|
516
|
+
* @param vector - The scaling vector.
|
|
517
|
+
* @param out - The matrix to store the result in.
|
|
518
|
+
* @returns The scaled matrix.
|
|
519
|
+
* @see [Transformation matrix](https://en.wikipedia.org/wiki/Transformation_matrix)
|
|
520
|
+
*/
|
|
237
521
|
scale(vector, out = new Matrix2()) {
|
|
238
522
|
return scale(this, vector, out);
|
|
239
523
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Matrix2.js","sourceRoot":"","sources":["../../src/linalg/Matrix2.ts"],"names":[],"mappings":"AAEA,OAAO,OAAO,MAAM,UAAU,CAAC;AAC/B,OAAO,mBAAmB,MAAM,sBAAsB,CAAC;AAYvD,MAAM,UAAU,iBAAiB;IAChC,OAAO,IAAI,YAAY,CAAC,CAAC,CAAgB,CAAC;AAC3C,CAAC;AAUD,MAAM,UAAU,YAAY,CAC3B,OAAe,EACf,GAAM;IAEN,MAAM,CAAC,GAAW,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACpC,MAAM,CAAC,GAAW,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAEpC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IACX,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IACX,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACZ,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IACX,OAAO,GAAG,CAAC;AACZ,CAAC;AAUD,MAAM,UAAU,WAAW,CAC1B,MAAmB,EACnB,GAAM;IAEN,GAAG,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;IACnB,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IACX,GAAG,CAAC,CAAC,CAAC,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