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