@lakuna/umath 1.3.8 → 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 (163) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +2 -0
  3. package/dist/algorithms/approx.d.ts +9 -0
  4. package/dist/algorithms/approx.d.ts.map +1 -0
  5. package/dist/algorithms/approx.js +12 -0
  6. package/dist/algorithms/approx.js.map +1 -0
  7. package/dist/algorithms/approxRelative.d.ts +9 -0
  8. package/dist/algorithms/approxRelative.d.ts.map +1 -0
  9. package/dist/algorithms/approxRelative.js +12 -0
  10. package/dist/algorithms/approxRelative.js.map +1 -0
  11. package/dist/algorithms/combinations.d.ts +2 -1
  12. package/dist/algorithms/combinations.d.ts.map +1 -1
  13. package/dist/algorithms/combinations.js +2 -1
  14. package/dist/algorithms/combinations.js.map +1 -1
  15. package/dist/algorithms/degreesToRadians.d.ts +3 -2
  16. package/dist/algorithms/degreesToRadians.d.ts.map +1 -1
  17. package/dist/algorithms/degreesToRadians.js +5 -3
  18. package/dist/algorithms/degreesToRadians.js.map +1 -1
  19. package/dist/algorithms/factorial.d.ts +2 -1
  20. package/dist/algorithms/factorial.d.ts.map +1 -1
  21. package/dist/algorithms/factorial.js +2 -1
  22. package/dist/algorithms/factorial.js.map +1 -1
  23. package/dist/algorithms/fibonacci.d.ts +2 -1
  24. package/dist/algorithms/fibonacci.d.ts.map +1 -1
  25. package/dist/algorithms/fibonacci.js +6 -2
  26. package/dist/algorithms/fibonacci.js.map +1 -1
  27. package/dist/algorithms/greatestCommonDivisor.d.ts +4 -2
  28. package/dist/algorithms/greatestCommonDivisor.d.ts.map +1 -1
  29. package/dist/algorithms/greatestCommonDivisor.js +5 -2
  30. package/dist/algorithms/greatestCommonDivisor.js.map +1 -1
  31. package/dist/algorithms/hypergeometricPmf.d.ts +3 -2
  32. package/dist/algorithms/hypergeometricPmf.d.ts.map +1 -1
  33. package/dist/algorithms/hypergeometricPmf.js +3 -2
  34. package/dist/algorithms/hypergeometricPmf.js.map +1 -1
  35. package/dist/algorithms/isPrime.d.ts +2 -1
  36. package/dist/algorithms/isPrime.d.ts.map +1 -1
  37. package/dist/algorithms/isPrime.js +2 -1
  38. package/dist/algorithms/isPrime.js.map +1 -1
  39. package/dist/algorithms/permutations.d.ts +2 -1
  40. package/dist/algorithms/permutations.d.ts.map +1 -1
  41. package/dist/algorithms/permutations.js +2 -1
  42. package/dist/algorithms/permutations.js.map +1 -1
  43. package/dist/algorithms/primeFactorization.d.ts +2 -1
  44. package/dist/algorithms/primeFactorization.d.ts.map +1 -1
  45. package/dist/algorithms/primeFactorization.js +4 -4
  46. package/dist/algorithms/primeFactorization.js.map +1 -1
  47. package/dist/algorithms/radiansToDegrees.d.ts +3 -2
  48. package/dist/algorithms/radiansToDegrees.d.ts.map +1 -1
  49. package/dist/algorithms/radiansToDegrees.js +5 -3
  50. package/dist/algorithms/radiansToDegrees.js.map +1 -1
  51. package/dist/algorithms/summation.d.ts +2 -1
  52. package/dist/algorithms/summation.d.ts.map +1 -1
  53. package/dist/algorithms/summation.js +2 -1
  54. package/dist/algorithms/summation.js.map +1 -1
  55. package/dist/linalg/DualQuaternion.d.ts +102 -32
  56. package/dist/linalg/DualQuaternion.d.ts.map +1 -1
  57. package/dist/linalg/DualQuaternion.js +249 -275
  58. package/dist/linalg/DualQuaternion.js.map +1 -1
  59. package/dist/linalg/Matrix.d.ts +14 -10
  60. package/dist/linalg/Matrix.d.ts.map +1 -1
  61. package/dist/linalg/Matrix2.d.ts +74 -51
  62. package/dist/linalg/Matrix2.d.ts.map +1 -1
  63. package/dist/linalg/Matrix2.js +96 -169
  64. package/dist/linalg/Matrix2.js.map +1 -1
  65. package/dist/linalg/Matrix3.d.ts +122 -72
  66. package/dist/linalg/Matrix3.d.ts.map +1 -1
  67. package/dist/linalg/Matrix3.js +205 -358
  68. package/dist/linalg/Matrix3.js.map +1 -1
  69. package/dist/linalg/Matrix4.d.ts +267 -150
  70. package/dist/linalg/Matrix4.d.ts.map +1 -1
  71. package/dist/linalg/Matrix4.js +553 -864
  72. package/dist/linalg/Matrix4.js.map +1 -1
  73. package/dist/linalg/Quaternion.d.ts +252 -34
  74. package/dist/linalg/Quaternion.d.ts.map +1 -1
  75. package/dist/linalg/Quaternion.js +436 -166
  76. package/dist/linalg/Quaternion.js.map +1 -1
  77. package/dist/linalg/SlowMatrix.d.ts +10 -9
  78. package/dist/linalg/SlowMatrix.d.ts.map +1 -1
  79. package/dist/linalg/SlowMatrix.js +10 -9
  80. package/dist/linalg/SlowMatrix.js.map +1 -1
  81. package/dist/linalg/SlowSquareMatrix.d.ts +10 -9
  82. package/dist/linalg/SlowSquareMatrix.d.ts.map +1 -1
  83. package/dist/linalg/SlowSquareMatrix.js +10 -9
  84. package/dist/linalg/SlowSquareMatrix.js.map +1 -1
  85. package/dist/linalg/SquareMatrix.d.ts +6 -5
  86. package/dist/linalg/SquareMatrix.d.ts.map +1 -1
  87. package/dist/linalg/Vector.d.ts +8 -4
  88. package/dist/linalg/Vector.d.ts.map +1 -1
  89. package/dist/linalg/Vector2.d.ts +82 -31
  90. package/dist/linalg/Vector2.d.ts.map +1 -1
  91. package/dist/linalg/Vector2.js +112 -154
  92. package/dist/linalg/Vector2.js.map +1 -1
  93. package/dist/linalg/Vector3.d.ts +93 -41
  94. package/dist/linalg/Vector3.d.ts.map +1 -1
  95. package/dist/linalg/Vector3.js +171 -282
  96. package/dist/linalg/Vector3.js.map +1 -1
  97. package/dist/linalg/Vector4.d.ts +71 -21
  98. package/dist/linalg/Vector4.d.ts.map +1 -1
  99. package/dist/linalg/Vector4.js +121 -195
  100. package/dist/linalg/Vector4.js.map +1 -1
  101. package/dist/types/AxisAngle.d.ts +4 -1
  102. package/dist/types/AxisAngle.d.ts.map +1 -1
  103. package/dist/types/FieldOfView.d.ts +4 -1
  104. package/dist/types/FieldOfView.d.ts.map +1 -1
  105. package/dist/utility/BigNumber.d.ts +4 -1
  106. package/dist/utility/BigNumber.d.ts.map +1 -1
  107. package/dist/utility/BigNumber.js +4 -1
  108. package/dist/utility/BigNumber.js.map +1 -1
  109. package/dist/utility/MagnitudeError.d.ts +4 -1
  110. package/dist/utility/MagnitudeError.d.ts.map +1 -1
  111. package/dist/utility/MagnitudeError.js +4 -1
  112. package/dist/utility/MagnitudeError.js.map +1 -1
  113. package/dist/utility/MatrixSizeError.d.ts +4 -1
  114. package/dist/utility/MatrixSizeError.d.ts.map +1 -1
  115. package/dist/utility/MatrixSizeError.js +4 -1
  116. package/dist/utility/MatrixSizeError.js.map +1 -1
  117. package/dist/utility/PartialMatrixError.d.ts +4 -1
  118. package/dist/utility/PartialMatrixError.d.ts.map +1 -1
  119. package/dist/utility/PartialMatrixError.js +4 -1
  120. package/dist/utility/PartialMatrixError.js.map +1 -1
  121. package/dist/utility/SingularMatrixError.d.ts +2 -1
  122. package/dist/utility/SingularMatrixError.d.ts.map +1 -1
  123. package/dist/utility/SingularMatrixError.js +2 -1
  124. package/dist/utility/SingularMatrixError.js.map +1 -1
  125. package/dist/utility/epsilon.d.ts +4 -1
  126. package/dist/utility/epsilon.d.ts.map +1 -1
  127. package/dist/utility/epsilon.js +4 -1
  128. package/dist/utility/epsilon.js.map +1 -1
  129. package/package.json +14 -18
  130. package/src/algorithms/approx.ts +12 -0
  131. package/src/algorithms/approxRelative.ts +12 -0
  132. package/src/algorithms/combinations.ts +2 -1
  133. package/src/algorithms/degreesToRadians.ts +6 -3
  134. package/src/algorithms/factorial.ts +3 -1
  135. package/src/algorithms/fibonacci.ts +7 -2
  136. package/src/algorithms/greatestCommonDivisor.ts +9 -4
  137. package/src/algorithms/hypergeometricPmf.ts +3 -2
  138. package/src/algorithms/isPrime.ts +2 -1
  139. package/src/algorithms/permutations.ts +2 -1
  140. package/src/algorithms/primeFactorization.ts +5 -3
  141. package/src/algorithms/radiansToDegrees.ts +6 -3
  142. package/src/algorithms/summation.ts +2 -1
  143. package/src/linalg/DualQuaternion.ts +430 -292
  144. package/src/linalg/Matrix.ts +14 -10
  145. package/src/linalg/Matrix2.ts +143 -185
  146. package/src/linalg/Matrix3.ts +421 -385
  147. package/src/linalg/Matrix4.ts +1147 -952
  148. package/src/linalg/Quaternion.ts +706 -188
  149. package/src/linalg/SlowMatrix.ts +10 -9
  150. package/src/linalg/SlowSquareMatrix.ts +10 -9
  151. package/src/linalg/SquareMatrix.ts +6 -5
  152. package/src/linalg/Vector.ts +8 -4
  153. package/src/linalg/Vector2.ts +146 -173
  154. package/src/linalg/Vector3.ts +293 -326
  155. package/src/linalg/Vector4.ts +227 -215
  156. package/src/types/AxisAngle.ts +4 -1
  157. package/src/types/FieldOfView.ts +4 -1
  158. package/src/utility/BigNumber.ts +6 -3
  159. package/src/utility/MagnitudeError.ts +4 -1
  160. package/src/utility/MatrixSizeError.ts +4 -1
  161. package/src/utility/PartialMatrixError.ts +4 -1
  162. package/src/utility/SingularMatrixError.ts +2 -1
  163. package/src/utility/epsilon.ts +4 -1
@@ -1,146 +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)
32
- */
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.
41
+ * @see {@link https://en.wikipedia.org/wiki/Transformation_matrix | Transformation matrix}
42
+ * @public
48
43
  */
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
- return Math.hypot(matrix[0], matrix[1], matrix[2], matrix[3]);
136
- };
98
+ export const frob = vector4GetMagnitude;
137
99
  /**
138
100
  * Multiply one matrix by another.
139
- * @param a - The multiplicand.
140
- * @param b - The multiplier.
101
+ * @param a - The multiplier.
102
+ * @param b - The multiplicand.
141
103
  * @param out - The matrix to store the result in.
142
104
  * @returns The product.
143
- * @see [Matrix multiplication](https://en.wikipedia.org/wiki/Matrix_multiplication)
105
+ * @see {@link https://en.wikipedia.org/wiki/Matrix_multiplication | Matrix multiplication}
106
+ * @public
144
107
  */
145
108
  export const multiply = (a, b, out) => {
146
109
  const a0 = a[0];
@@ -151,27 +114,18 @@ export const multiply = (a, b, out) => {
151
114
  const b1 = b[1];
152
115
  const b2 = b[2];
153
116
  const b3 = b[3];
154
- out[0] = a0 * b0 + a2 * b1;
155
- out[1] = a1 * b0 + a3 * b1;
156
- out[2] = a0 * b2 + a2 * b3;
157
- out[3] = a1 * b2 + a3 * b3;
158
- return out;
117
+ return fromValues(a0 * b0 + a2 * b1, a1 * b0 + a3 * b1, a0 * b2 + a2 * b3, a1 * b2 + a3 * b3, out);
159
118
  };
160
119
  /**
161
120
  * Multiply a matrix by a scalar value.
162
- * @param matrix - The multiplicand.
163
- * @param scalar - The multiplier.
121
+ * @param matrix - The multiplier.
122
+ * @param scalar - The multiplicand.
164
123
  * @param out - The matrix to store the result in.
165
124
  * @returns The product.
166
- * @see [Matrix multiplication](https://en.wikipedia.org/wiki/Matrix_multiplication)
125
+ * @see {@link https://en.wikipedia.org/wiki/Matrix_multiplication | Matrix multiplication}
126
+ * @public
167
127
  */
168
- export const multiplyScalar = (matrix, scalar, out) => {
169
- out[0] = matrix[0] * scalar;
170
- out[1] = matrix[1] * scalar;
171
- out[2] = matrix[2] * scalar;
172
- out[3] = matrix[3] * scalar;
173
- return out;
174
- };
128
+ export const multiplyScalar = vector4Scale;
175
129
  /**
176
130
  * Add a matrix to another after multiplying the other by a scalar.
177
131
  * @param a - The augend.
@@ -179,80 +133,61 @@ export const multiplyScalar = (matrix, scalar, out) => {
179
133
  * @param scalar - The multiplier.
180
134
  * @param out - The matrix to store the result in.
181
135
  * @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)
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
184
139
  */
185
- export const multiplyScalarAndAdd = (a, b, scalar, out) => {
186
- out[0] = a[0] + b[0] * scalar;
187
- out[1] = a[1] + b[1] * scalar;
188
- out[2] = a[2] + b[2] * scalar;
189
- out[3] = a[3] + b[3] * scalar;
190
- return out;
191
- };
140
+ export const multiplyScalarAndAdd = vector4ScaleAndAdd;
192
141
  /**
193
142
  * Subtract one matrix from another.
194
143
  * @param a - The minuend.
195
144
  * @param b - The subtrahend.
196
145
  * @param out - The matrix to store the result in.
197
146
  * @returns The difference.
198
- * @see [Matrix addition](https://en.wikipedia.org/wiki/Matrix_addition)
147
+ * @see {@link https://en.wikipedia.org/wiki/Matrix_addition | Matrix addition}
148
+ * @public
199
149
  */
200
- export const subtract = (a, b, out) => {
201
- out[0] = a[0] - b[0];
202
- out[1] = a[1] - b[1];
203
- out[2] = a[2] - b[2];
204
- out[3] = a[3] - b[3];
205
- return out;
206
- };
150
+ export const subtract = vector4Subtract;
207
151
  /**
208
152
  * Transpose a matrix.
209
153
  * @param matrix - The matrix.
210
154
  * @param out - The matrix to store the result in.
211
155
  * @returns The transpose of the matrix.
212
- * @see [Transpose](https://en.wikipedia.org/wiki/Transpose)
156
+ * @see {@link https://en.wikipedia.org/wiki/Transpose | Transpose}
157
+ * @public
213
158
  */
214
159
  export const transpose = (matrix, out) => {
215
160
  if (out === matrix) {
216
161
  const a1 = matrix[1];
217
162
  out[1] = matrix[2];
218
163
  out[2] = a1;
164
+ return out;
219
165
  }
220
- else {
221
- out[0] = matrix[0];
222
- out[1] = matrix[2];
223
- out[2] = matrix[1];
224
- out[3] = matrix[3];
225
- }
226
- return out;
166
+ return fromValues(matrix[0], matrix[2], matrix[1], matrix[3], out);
227
167
  };
228
168
  /**
229
169
  * Calculate the determinant of a matrix.
230
170
  * @param matrix- The matrix.
231
171
  * @returns The determinant.
232
- * @see [Determinant](https://en.wikipedia.org/wiki/Determinant)
172
+ * @see {@link https://en.wikipedia.org/wiki/Determinant | Determinant}
173
+ * @public
233
174
  */
234
- export const determinant = (matrix) => {
235
- return matrix[0] * matrix[3] - matrix[2] * matrix[1];
236
- };
175
+ export const determinant = (matrix) => matrix[0] * matrix[3] - matrix[2] * matrix[1];
237
176
  /**
238
177
  * Reset a matrix to identity.
239
178
  * @param out - The matrix to store the result in.
240
179
  * @returns The matrix.
241
- * @see [Identity matrix](https://en.wikipedia.org/wiki/Identity_matrix)
180
+ * @see {@link https://en.wikipedia.org/wiki/Identity_matrix | Identity matrix}
181
+ * @public
242
182
  */
243
- export const identity = (out) => {
244
- out[0] = 1;
245
- out[1] = 0;
246
- out[2] = 0;
247
- out[3] = 1;
248
- return out;
249
- };
183
+ export const identity = (out) => fromValues(1, 0, 0, 1, out);
250
184
  /**
251
185
  * Invert a matrix.
252
186
  * @param matrix - The matrix.
253
187
  * @param out - The matrix to store the result in.
254
188
  * @returns The inverted matrix.
255
- * @see [Invertible matrix](https://en.wikipedia.org/wiki/Invertible_matrix)
189
+ * @see {@link https://en.wikipedia.org/wiki/Invertible_matrix | Invertible matrix}
190
+ * @public
256
191
  */
257
192
  export const invert = (matrix, out) => {
258
193
  const a0 = matrix[0];
@@ -264,11 +199,7 @@ export const invert = (matrix, out) => {
264
199
  throw new SingularMatrixError();
265
200
  }
266
201
  det = 1 / det;
267
- out[0] = a3 * det;
268
- out[1] = -a1 * det;
269
- out[2] = -a2 * det;
270
- out[3] = a0 * det;
271
- return out;
202
+ return fromValues(a3 * det, -a1 * det, -a2 * det, a0 * det, out);
272
203
  };
273
204
  /**
274
205
  * Rotate a matrix by the given angle.
@@ -276,7 +207,8 @@ export const invert = (matrix, out) => {
276
207
  * @param r - The angle in radians.
277
208
  * @param out - The matrix to store the result in.
278
209
  * @returns The rotated matrix.
279
- * @see [Rotation matrix](https://en.wikipedia.org/wiki/Rotation_matrix)
210
+ * @see {@link https://en.wikipedia.org/wiki/Rotation_matrix | Rotation matrix}
211
+ * @public
280
212
  */
281
213
  export const rotate = (matrix, r, out) => {
282
214
  const a0 = matrix[0];
@@ -285,11 +217,7 @@ export const rotate = (matrix, r, out) => {
285
217
  const a3 = matrix[3];
286
218
  const s = Math.sin(r);
287
219
  const c = Math.cos(r);
288
- out[0] = a0 * c + a2 * s;
289
- out[1] = a1 * c + a3 * s;
290
- out[2] = a0 * -s + a2 * c;
291
- out[3] = a1 * -s + a3 * c;
292
- return out;
220
+ return fromValues(a0 * c + a2 * s, a1 * c + a3 * s, a0 * -s + a2 * c, a1 * -s + a3 * c, out);
293
221
  };
294
222
  /**
295
223
  * Scale a matrix by the given vector.
@@ -297,20 +225,18 @@ export const rotate = (matrix, r, out) => {
297
225
  * @param vector - The scaling vector.
298
226
  * @param out - The matrix to store the result in.
299
227
  * @returns The scaled matrix.
300
- * @see [Transformation matrix](https://en.wikipedia.org/wiki/Transformation_matrix)
228
+ * @see {@link https://en.wikipedia.org/wiki/Transformation_matrix | Transformation matrix}
229
+ * @public
301
230
  */
302
231
  export const scale = (matrix, vector, out) => {
303
232
  const v0 = vector[0];
304
233
  const v1 = vector[1];
305
- out[0] = matrix[0] * v0;
306
- out[1] = matrix[1] * v0;
307
- out[2] = matrix[2] * v1;
308
- out[3] = matrix[3] * v1;
309
- return out;
234
+ return fromValues(matrix[0] * v0, matrix[1] * v0, matrix[2] * v1, matrix[3] * v1, out);
310
235
  };
311
236
  /**
312
237
  * A two-by-two matrix.
313
- * @see [Matrix](https://en.wikipedia.org/wiki/Matrix_(mathematics))
238
+ * @see {@link https://en.wikipedia.org/wiki/Matrix_(mathematics) | Matrix}
239
+ * @public
314
240
  */
315
241
  export default class Matrix2 extends Float32Array {
316
242
  /**
@@ -318,7 +244,7 @@ export default class Matrix2 extends Float32Array {
318
244
  * @param r - The angle in radians.
319
245
  * @param out - The matrix to store the result in.
320
246
  * @returns The transformation matrix.
321
- * @see [Rotation matrix](https://en.wikipedia.org/wiki/Rotation_matrix)
247
+ * @see {@link https://en.wikipedia.org/wiki/Rotation_matrix | Rotation matrix}
322
248
  */
323
249
  static fromRotation(r, out = new Matrix2()) {
324
250
  return fromRotation(r, out);
@@ -328,7 +254,7 @@ export default class Matrix2 extends Float32Array {
328
254
  * @param vector - The scaling vector.
329
255
  * @param out - The matrix to store the result in.
330
256
  * @returns The transformation matrix.
331
- * @see [Transformation matrix](https://en.wikipedia.org/wiki/Transformation_matrix)
257
+ * @see {@link https://en.wikipedia.org/wiki/Transformation_matrix | Transformation matrix}
332
258
  */
333
259
  static fromScaling(vector, out = new Matrix2()) {
334
260
  return fromScaling(vector, out);
@@ -347,7 +273,7 @@ export default class Matrix2 extends Float32Array {
347
273
  }
348
274
  /**
349
275
  * Create a two-by-two identity matrix.
350
- * @see [Identity matrix](https://en.wikipedia.org/wiki/Identity_matrix)
276
+ * @see {@link https://en.wikipedia.org/wiki/Identity_matrix | Identity matrix}
351
277
  */
352
278
  constructor() {
353
279
  super(4);
@@ -389,7 +315,7 @@ export default class Matrix2 extends Float32Array {
389
315
  * @param matrix - The other matrix.
390
316
  * @param out - The matrix to store the result in.
391
317
  * @returns The sum of the matrices.
392
- * @see [Matrix addition](https://en.wikipedia.org/wiki/Matrix_addition)
318
+ * @see {@link https://en.wikipedia.org/wiki/Matrix_addition | Matrix addition}
393
319
  */
394
320
  add(matrix, out = new Matrix2()) {
395
321
  return add(this, matrix, out);
@@ -398,7 +324,7 @@ export default class Matrix2 extends Float32Array {
398
324
  * Calculate the adjugate of this matrix.
399
325
  * @param out - The matrix to store the result in.
400
326
  * @returns The adjugate of this matrix.
401
- * @see [Adjugate matrix](https://en.wikipedia.org/wiki/Adjugate_matrix)
327
+ * @see {@link https://en.wikipedia.org/wiki/Adjugate_matrix | Adjugate matrix}
402
328
  */
403
329
  adjoint(out = new Matrix2()) {
404
330
  return adjoint(this, out);
@@ -421,7 +347,7 @@ export default class Matrix2 extends Float32Array {
421
347
  }
422
348
  /**
423
349
  * Get the Frobenius norm of this matrix.
424
- * @see [Matrix norm](https://en.wikipedia.org/wiki/Matrix_norm)
350
+ * @see {@link https://en.wikipedia.org/wiki/Matrix_norm | Matrix norm}
425
351
  */
426
352
  get frob() {
427
353
  return frob(this);
@@ -431,7 +357,8 @@ export default class Matrix2 extends Float32Array {
431
357
  * @param matrix - The other matrix.
432
358
  * @param out - The matrix to store the result in.
433
359
  * @returns The product of the matrices.
434
- * @see [Matrix multiplication](https://en.wikipedia.org/wiki/Matrix_multiplication)
360
+ * @see {@link https://en.wikipedia.org/wiki/Matrix_multiplication | Matrix multiplication}
361
+ * @public
435
362
  */
436
363
  multiply(matrix, out = new Matrix2()) {
437
364
  return multiply(this, matrix, out);
@@ -441,7 +368,7 @@ export default class Matrix2 extends Float32Array {
441
368
  * @param scalar - The scalar value.
442
369
  * @param out - The matrix to store the result in.
443
370
  * @returns The product of the matrix and the scalar value.
444
- * @see [Matrix multiplication](https://en.wikipedia.org/wiki/Matrix_multiplication)
371
+ * @see {@link https://en.wikipedia.org/wiki/Matrix_multiplication | Matrix multiplication}
445
372
  */
446
373
  multiplyScalar(scalar, out = new Matrix2()) {
447
374
  return multiplyScalar(this, scalar, out);
@@ -452,8 +379,8 @@ export default class Matrix2 extends Float32Array {
452
379
  * @param scalar - The scalar.
453
380
  * @param out - The matrix to store the result in.
454
381
  * @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)
382
+ * @see {@link https://en.wikipedia.org/wiki/Matrix_addition | Matrix addition}
383
+ * @see {@link https://en.wikipedia.org/wiki/Matrix_multiplication | Matrix multiplication}
457
384
  */
458
385
  multiplyScalarAndAdd(matrix, scalar, out = new Matrix2()) {
459
386
  return multiplyScalarAndAdd(this, matrix, scalar, out);
@@ -463,7 +390,7 @@ export default class Matrix2 extends Float32Array {
463
390
  * @param matrix - The other matrix.
464
391
  * @param out - The matrix to store the result in.
465
392
  * @returns The difference between the matrices.
466
- * @see [Matrix addition](https://en.wikipedia.org/wiki/Matrix_addition)
393
+ * @see {@link https://en.wikipedia.org/wiki/Matrix_addition | Matrix addition}
467
394
  */
468
395
  subtract(matrix, out = new Matrix2()) {
469
396
  return subtract(this, matrix, out);
@@ -472,14 +399,14 @@ export default class Matrix2 extends Float32Array {
472
399
  * Transpose this matrix.
473
400
  * @param out - The matrix to store the result in.
474
401
  * @returns The transpose of this matrix.
475
- * @see [Transpose](https://en.wikipedia.org/wiki/Transpose)
402
+ * @see {@link https://en.wikipedia.org/wiki/Transpose | Transpose}
476
403
  */
477
404
  transpose(out = new Matrix2()) {
478
405
  return transpose(this, out);
479
406
  }
480
407
  /**
481
408
  * Get the determinant of this matrix.
482
- * @see [Determinant](https://en.wikipedia.org/wiki/Determinant)
409
+ * @see {@link https://en.wikipedia.org/wiki/Determinant | Determinant}
483
410
  */
484
411
  get determinant() {
485
412
  return determinant(this);
@@ -487,7 +414,7 @@ export default class Matrix2 extends Float32Array {
487
414
  /**
488
415
  * Reset this matrix to identity.
489
416
  * @returns This matrix.
490
- * @see [Identity matrix](https://en.wikipedia.org/wiki/Identity_matrix)
417
+ * @see {@link https://en.wikipedia.org/wiki/Identity_matrix | Identity matrix}
491
418
  */
492
419
  identity() {
493
420
  return identity(this);
@@ -496,7 +423,7 @@ export default class Matrix2 extends Float32Array {
496
423
  * Invert this matrix.
497
424
  * @param out - The matrix to store the result in.
498
425
  * @returns The inverted matrix.
499
- * @see [Invertible matrix](https://en.wikipedia.org/wiki/Invertible_matrix)
426
+ * @see {@link https://en.wikipedia.org/wiki/Invertible_matrix | Invertible matrix}
500
427
  */
501
428
  invert(out = new Matrix2()) {
502
429
  return invert(this, out);
@@ -506,7 +433,7 @@ export default class Matrix2 extends Float32Array {
506
433
  * @param r - The angle in radians.
507
434
  * @param out - The matrix to store the result in.
508
435
  * @returns The rotated matrix.
509
- * @see [Rotation matrix](https://en.wikipedia.org/wiki/Rotation_matrix)
436
+ * @see {@link https://en.wikipedia.org/wiki/Rotation_matrix | Rotation matrix}
510
437
  */
511
438
  rotate(r, out = new Matrix2()) {
512
439
  return rotate(this, r, out);
@@ -516,7 +443,7 @@ export default class Matrix2 extends Float32Array {
516
443
  * @param vector - The scaling vector.
517
444
  * @param out - The matrix to store the result in.
518
445
  * @returns The scaled matrix.
519
- * @see [Transformation matrix](https://en.wikipedia.org/wiki/Transformation_matrix)
446
+ * @see {@link https://en.wikipedia.org/wiki/Transformation_matrix | Transformation matrix}
520
447
  */
521
448
  scale(vector, out = new Matrix2()) {
522
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,CAAC,GAAG,CAAC,CAAC;IACX,GAAG,CAAC,CAAC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