@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.
Files changed (162) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +7 -9
  3. package/dist/algorithms/combinations.d.ts +7 -0
  4. package/dist/algorithms/combinations.d.ts.map +1 -1
  5. package/dist/algorithms/combinations.js +8 -1
  6. package/dist/algorithms/combinations.js.map +1 -1
  7. package/dist/algorithms/degreesToRadians.d.ts +7 -0
  8. package/dist/algorithms/degreesToRadians.d.ts.map +1 -1
  9. package/dist/algorithms/degreesToRadians.js +7 -0
  10. package/dist/algorithms/degreesToRadians.js.map +1 -1
  11. package/dist/algorithms/factorial.d.ts +6 -0
  12. package/dist/algorithms/factorial.d.ts.map +1 -1
  13. package/dist/algorithms/factorial.js +15 -5
  14. package/dist/algorithms/factorial.js.map +1 -1
  15. package/dist/algorithms/fibonacci.d.ts +6 -1
  16. package/dist/algorithms/fibonacci.d.ts.map +1 -1
  17. package/dist/algorithms/fibonacci.js +6 -1
  18. package/dist/algorithms/fibonacci.js.map +1 -1
  19. package/dist/algorithms/greatestCommonDivisor.d.ts +14 -0
  20. package/dist/algorithms/greatestCommonDivisor.d.ts.map +1 -1
  21. package/dist/algorithms/greatestCommonDivisor.js +7 -9
  22. package/dist/algorithms/greatestCommonDivisor.js.map +1 -1
  23. package/dist/algorithms/hypergeometricPmf.d.ts +9 -0
  24. package/dist/algorithms/hypergeometricPmf.d.ts.map +1 -1
  25. package/dist/algorithms/hypergeometricPmf.js +10 -1
  26. package/dist/algorithms/hypergeometricPmf.js.map +1 -1
  27. package/dist/algorithms/isPrime.d.ts +6 -0
  28. package/dist/algorithms/isPrime.d.ts.map +1 -1
  29. package/dist/algorithms/isPrime.js +8 -1
  30. package/dist/algorithms/isPrime.js.map +1 -1
  31. package/dist/algorithms/permutations.d.ts +7 -0
  32. package/dist/algorithms/permutations.d.ts.map +1 -1
  33. package/dist/algorithms/permutations.js +8 -1
  34. package/dist/algorithms/permutations.js.map +1 -1
  35. package/dist/algorithms/primeFactorization.d.ts +7 -1
  36. package/dist/algorithms/primeFactorization.d.ts.map +1 -1
  37. package/dist/algorithms/primeFactorization.js +10 -3
  38. package/dist/algorithms/primeFactorization.js.map +1 -1
  39. package/dist/algorithms/radiansToDegrees.d.ts +7 -0
  40. package/dist/algorithms/radiansToDegrees.d.ts.map +1 -1
  41. package/dist/algorithms/radiansToDegrees.js +7 -0
  42. package/dist/algorithms/radiansToDegrees.js.map +1 -1
  43. package/dist/algorithms/summation.d.ts +8 -0
  44. package/dist/algorithms/summation.d.ts.map +1 -1
  45. package/dist/algorithms/summation.js +9 -0
  46. package/dist/algorithms/summation.js.map +1 -1
  47. package/dist/index.d.ts +32 -33
  48. package/dist/index.d.ts.map +1 -1
  49. package/dist/index.js +27 -27
  50. package/dist/index.js.map +1 -1
  51. package/dist/linalg/DualQuaternion.d.ts +460 -83
  52. package/dist/linalg/DualQuaternion.d.ts.map +1 -1
  53. package/dist/linalg/DualQuaternion.js +514 -133
  54. package/dist/linalg/DualQuaternion.js.map +1 -1
  55. package/dist/linalg/Matrix.d.ts +80 -12
  56. package/dist/linalg/Matrix.d.ts.map +1 -1
  57. package/dist/linalg/Matrix2.d.ts +337 -52
  58. package/dist/linalg/Matrix2.d.ts.map +1 -1
  59. package/dist/linalg/Matrix2.js +345 -61
  60. package/dist/linalg/Matrix2.js.map +1 -1
  61. package/dist/linalg/Matrix3.d.ts +470 -72
  62. package/dist/linalg/Matrix3.d.ts.map +1 -1
  63. package/dist/linalg/Matrix3.js +488 -94
  64. package/dist/linalg/Matrix3.js.map +1 -1
  65. package/dist/linalg/Matrix4.d.ts +842 -137
  66. package/dist/linalg/Matrix4.d.ts.map +1 -1
  67. package/dist/linalg/Matrix4.js +896 -175
  68. package/dist/linalg/Matrix4.js.map +1 -1
  69. package/dist/linalg/Quaternion.d.ts +395 -70
  70. package/dist/linalg/Quaternion.d.ts.map +1 -1
  71. package/dist/linalg/Quaternion.js +416 -70
  72. package/dist/linalg/Quaternion.js.map +1 -1
  73. package/dist/linalg/SlowMatrix.d.ts +79 -9
  74. package/dist/linalg/SlowMatrix.d.ts.map +1 -1
  75. package/dist/linalg/SlowMatrix.js +147 -27
  76. package/dist/linalg/SlowMatrix.js.map +1 -1
  77. package/dist/linalg/SlowSquareMatrix.d.ts +58 -3
  78. package/dist/linalg/SlowSquareMatrix.d.ts.map +1 -1
  79. package/dist/linalg/SlowSquareMatrix.js +111 -21
  80. package/dist/linalg/SlowSquareMatrix.js.map +1 -1
  81. package/dist/linalg/SquareMatrix.d.ts +26 -3
  82. package/dist/linalg/SquareMatrix.d.ts.map +1 -1
  83. package/dist/linalg/Vector.d.ts +148 -24
  84. package/dist/linalg/Vector.d.ts.map +1 -1
  85. package/dist/linalg/Vector2.d.ts +484 -84
  86. package/dist/linalg/Vector2.d.ts.map +1 -1
  87. package/dist/linalg/Vector2.js +487 -71
  88. package/dist/linalg/Vector2.js.map +1 -1
  89. package/dist/linalg/Vector3.d.ts +582 -98
  90. package/dist/linalg/Vector3.d.ts.map +1 -1
  91. package/dist/linalg/Vector3.js +625 -134
  92. package/dist/linalg/Vector3.js.map +1 -1
  93. package/dist/linalg/Vector4.d.ts +450 -75
  94. package/dist/linalg/Vector4.d.ts.map +1 -1
  95. package/dist/linalg/Vector4.js +447 -62
  96. package/dist/linalg/Vector4.js.map +1 -1
  97. package/dist/types/AxisAngle.d.ts +4 -1
  98. package/dist/types/AxisAngle.d.ts.map +1 -1
  99. package/dist/types/FieldOfView.d.ts +5 -0
  100. package/dist/types/FieldOfView.d.ts.map +1 -1
  101. package/dist/utility/BigNumber.d.ts +41 -8
  102. package/dist/utility/BigNumber.d.ts.map +1 -1
  103. package/dist/utility/BigNumber.js +47 -5
  104. package/dist/utility/BigNumber.js.map +1 -1
  105. package/dist/utility/MagnitudeError.d.ts +5 -0
  106. package/dist/utility/MagnitudeError.d.ts.map +1 -1
  107. package/dist/utility/MagnitudeError.js +6 -1
  108. package/dist/utility/MagnitudeError.js.map +1 -1
  109. package/dist/utility/MatrixSizeError.d.ts +5 -0
  110. package/dist/utility/MatrixSizeError.d.ts.map +1 -1
  111. package/dist/utility/MatrixSizeError.js +5 -0
  112. package/dist/utility/MatrixSizeError.js.map +1 -1
  113. package/dist/utility/PartialMatrixError.d.ts +5 -0
  114. package/dist/utility/PartialMatrixError.d.ts.map +1 -1
  115. package/dist/utility/PartialMatrixError.js +5 -0
  116. package/dist/utility/PartialMatrixError.js.map +1 -1
  117. package/dist/utility/SingularMatrixError.d.ts +8 -0
  118. package/dist/utility/SingularMatrixError.d.ts.map +1 -1
  119. package/dist/utility/SingularMatrixError.js +8 -0
  120. package/dist/utility/SingularMatrixError.js.map +1 -1
  121. package/dist/utility/epsilon.d.ts +1 -0
  122. package/dist/utility/epsilon.d.ts.map +1 -1
  123. package/dist/utility/epsilon.js +1 -0
  124. package/dist/utility/epsilon.js.map +1 -1
  125. package/package.json +20 -51
  126. package/src/algorithms/combinations.ts +4 -4
  127. package/src/algorithms/degreesToRadians.ts +3 -3
  128. package/src/algorithms/factorial.ts +13 -8
  129. package/src/algorithms/fibonacci.ts +3 -3
  130. package/src/algorithms/greatestCommonDivisor.ts +15 -19
  131. package/src/algorithms/hypergeometricPmf.ts +5 -6
  132. package/src/algorithms/isPrime.ts +4 -4
  133. package/src/algorithms/permutations.ts +4 -4
  134. package/src/algorithms/primeFactorization.ts +9 -9
  135. package/src/algorithms/radiansToDegrees.ts +3 -3
  136. package/src/algorithms/summation.ts +5 -5
  137. package/src/index.ts +35 -33
  138. package/src/linalg/DualQuaternion.ts +558 -804
  139. package/src/linalg/Matrix.ts +35 -36
  140. package/src/linalg/Matrix2.ts +277 -413
  141. package/src/linalg/Matrix3.ts +532 -737
  142. package/src/linalg/Matrix4.ts +1078 -1604
  143. package/src/linalg/Quaternion.ts +415 -690
  144. package/src/linalg/SlowMatrix.ts +118 -69
  145. package/src/linalg/SlowSquareMatrix.ts +85 -56
  146. package/src/linalg/SquareMatrix.ts +7 -7
  147. package/src/linalg/Vector.ts +71 -70
  148. package/src/linalg/Vector2.ts +380 -576
  149. package/src/linalg/Vector3.ts +544 -840
  150. package/src/linalg/Vector4.ts +383 -549
  151. package/src/types/AxisAngle.ts +1 -1
  152. package/src/utility/BigNumber.ts +33 -42
  153. package/src/utility/MagnitudeError.ts +4 -4
  154. package/src/utility/MatrixSizeError.ts +2 -3
  155. package/src/utility/PartialMatrixError.ts +2 -3
  156. package/src/utility/SingularMatrixError.ts +2 -2
  157. package/src/utility/epsilon.ts +1 -4
  158. package/dist/types/IntegerRepresentation.d.ts +0 -2
  159. package/dist/types/IntegerRepresentation.d.ts.map +0 -1
  160. package/dist/types/IntegerRepresentation.js +0 -2
  161. package/dist/types/IntegerRepresentation.js.map +0 -1
  162. package/src/types/IntegerRepresentation.ts +0 -2
@@ -1,32 +1,65 @@
1
- import epsilon from "#epsilon";
2
- import SingularMatrixError from "#SingularMatrixError";
3
- export function createMatrix2Like() {
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
- export function fromRotation(radians, out) {
7
- const s = Math.sin(radians);
8
- const c = Math.cos(radians);
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
- export function fromScaling(vector, out) {
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
- export function fromValues(c0r0, c0r1, c1r0, c1r1, out) {
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
- export function equals(a, b) {
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
- export function exactEquals(a, b) {
44
- return a[0] == b[0] && a[1] == b[1] && a[2] == b[2] && a[3] == b[3];
45
- }
46
- export function add(a, b, out) {
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
- export function adjoint(matrix, out) {
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
- export function copy(matrix, out) {
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
- export function frob(matrix) {
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
- export function multiply(a, b, out) {
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
- export function multiplyScalar(matrix, scalar, out) {
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
- export function multiplyScalarAndAdd(a, b, scalar, out) {
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
- export function subtract(a, b, out) {
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
- export function transpose(matrix, out) {
108
- if (out == matrix) {
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
- export function determinant(matrix) {
122
- return (matrix[0] * matrix[3] -
123
- matrix[2] * matrix[1]);
124
- }
125
- export function identity(out) {
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
- export function invert(matrix, out) {
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 determinant = a0 * a3 - a2 * a1;
138
- if (!determinant) {
262
+ let det = a0 * a3 - a2 * a1;
263
+ if (!det) {
139
264
  throw new SingularMatrixError();
140
265
  }
141
- determinant = 1 / determinant;
142
- out[0] = a3 * determinant;
143
- out[1] = -a1 * determinant;
144
- out[2] = -a2 * determinant;
145
- out[3] = a0 * determinant;
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
- export function rotate(matrix, radians, out) {
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(radians);
154
- const c = Math.cos(radians);
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
- export function scale(matrix, vector, out) {
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
- static fromRotation(radians, out = new Matrix2()) {
172
- return fromRotation(radians, out);
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
- rotate(radians, out = new Matrix2()) {
235
- return rotate(this, radians, out);
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,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