@ac-kit/math-linear 0.2.1 → 0.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 (178) hide show
  1. package/CHANGELOG.md +337 -0
  2. package/README.md +232 -16
  3. package/dist/_brand.d.ts +14 -0
  4. package/dist/_brand.d.ts.map +1 -0
  5. package/dist/_brand.js +2 -0
  6. package/dist/_brand.js.map +1 -0
  7. package/dist/_invert.d.ts +214 -0
  8. package/dist/_invert.d.ts.map +1 -0
  9. package/dist/_invert.js +884 -0
  10. package/dist/_invert.js.map +1 -0
  11. package/dist/_slerp.d.ts +29 -0
  12. package/dist/_slerp.d.ts.map +1 -1
  13. package/dist/_slerp.js +103 -0
  14. package/dist/_slerp.js.map +1 -1
  15. package/dist/_strided-range.d.ts +23 -0
  16. package/dist/_strided-range.d.ts.map +1 -0
  17. package/dist/_strided-range.js +75 -0
  18. package/dist/_strided-range.js.map +1 -0
  19. package/dist/_trs.d.ts +38 -0
  20. package/dist/_trs.d.ts.map +1 -0
  21. package/dist/_trs.js +132 -0
  22. package/dist/_trs.js.map +1 -0
  23. package/dist/affine2-array.d.ts +53 -0
  24. package/dist/affine2-array.d.ts.map +1 -0
  25. package/dist/affine2-array.js +107 -0
  26. package/dist/affine2-array.js.map +1 -0
  27. package/dist/affine2-componentwise.d.ts +28 -0
  28. package/dist/affine2-componentwise.d.ts.map +1 -0
  29. package/dist/affine2-componentwise.js +66 -0
  30. package/dist/affine2-componentwise.js.map +1 -0
  31. package/dist/affine2.d.ts +156 -0
  32. package/dist/affine2.d.ts.map +1 -0
  33. package/dist/affine2.js +437 -0
  34. package/dist/affine2.js.map +1 -0
  35. package/dist/affine3-array.d.ts +53 -0
  36. package/dist/affine3-array.d.ts.map +1 -0
  37. package/dist/affine3-array.js +137 -0
  38. package/dist/affine3-array.js.map +1 -0
  39. package/dist/affine3-componentwise.d.ts +32 -0
  40. package/dist/affine3-componentwise.d.ts.map +1 -0
  41. package/dist/affine3-componentwise.js +100 -0
  42. package/dist/affine3-componentwise.js.map +1 -0
  43. package/dist/affine3.d.ts +205 -0
  44. package/dist/affine3.d.ts.map +1 -0
  45. package/dist/affine3.js +792 -0
  46. package/dist/affine3.js.map +1 -0
  47. package/dist/checked/index.d.ts +35 -0
  48. package/dist/checked/index.d.ts.map +1 -0
  49. package/dist/checked/index.js +58 -0
  50. package/dist/checked/index.js.map +1 -0
  51. package/dist/euler.d.ts +65 -0
  52. package/dist/euler.d.ts.map +1 -0
  53. package/dist/euler.js +217 -0
  54. package/dist/euler.js.map +1 -0
  55. package/dist/index.d.ts +29 -0
  56. package/dist/index.d.ts.map +1 -1
  57. package/dist/index.js +29 -0
  58. package/dist/index.js.map +1 -1
  59. package/dist/kl-activations.d.ts.map +1 -1
  60. package/dist/kl-activations.js +4 -3
  61. package/dist/kl-activations.js.map +1 -1
  62. package/dist/mat2x2-array.d.ts +36 -0
  63. package/dist/mat2x2-array.d.ts.map +1 -0
  64. package/dist/mat2x2-array.js +71 -0
  65. package/dist/mat2x2-array.js.map +1 -0
  66. package/dist/mat2x2-componentwise.d.ts +86 -0
  67. package/dist/mat2x2-componentwise.d.ts.map +1 -0
  68. package/dist/mat2x2-componentwise.js +199 -0
  69. package/dist/mat2x2-componentwise.js.map +1 -0
  70. package/dist/mat2x2.d.ts +79 -25
  71. package/dist/mat2x2.d.ts.map +1 -1
  72. package/dist/mat2x2.js +192 -93
  73. package/dist/mat2x2.js.map +1 -1
  74. package/dist/mat3x3-array.d.ts +36 -0
  75. package/dist/mat3x3-array.d.ts.map +1 -0
  76. package/dist/mat3x3-array.js +91 -0
  77. package/dist/mat3x3-array.js.map +1 -0
  78. package/dist/mat3x3-componentwise.d.ts +86 -0
  79. package/dist/mat3x3-componentwise.d.ts.map +1 -0
  80. package/dist/mat3x3-componentwise.js +299 -0
  81. package/dist/mat3x3-componentwise.js.map +1 -0
  82. package/dist/mat3x3.d.ts +153 -48
  83. package/dist/mat3x3.d.ts.map +1 -1
  84. package/dist/mat3x3.js +470 -192
  85. package/dist/mat3x3.js.map +1 -1
  86. package/dist/mat4x4-array.d.ts +46 -0
  87. package/dist/mat4x4-array.d.ts.map +1 -0
  88. package/dist/mat4x4-array.js +133 -0
  89. package/dist/mat4x4-array.js.map +1 -0
  90. package/dist/mat4x4-componentwise.d.ts +87 -0
  91. package/dist/mat4x4-componentwise.d.ts.map +1 -0
  92. package/dist/mat4x4-componentwise.js +434 -0
  93. package/dist/mat4x4-componentwise.js.map +1 -0
  94. package/dist/mat4x4.d.ts +221 -67
  95. package/dist/mat4x4.d.ts.map +1 -1
  96. package/dist/mat4x4.js +972 -334
  97. package/dist/mat4x4.js.map +1 -1
  98. package/dist/projection.d.ts +113 -0
  99. package/dist/projection.d.ts.map +1 -0
  100. package/dist/projection.js +418 -0
  101. package/dist/projection.js.map +1 -0
  102. package/dist/quaternion-array.d.ts +47 -0
  103. package/dist/quaternion-array.d.ts.map +1 -0
  104. package/dist/quaternion-array.js +86 -0
  105. package/dist/quaternion-array.js.map +1 -0
  106. package/dist/quaternion.d.ts +106 -22
  107. package/dist/quaternion.d.ts.map +1 -1
  108. package/dist/quaternion.js +253 -182
  109. package/dist/quaternion.js.map +1 -1
  110. package/dist/transform.d.ts +220 -0
  111. package/dist/transform.d.ts.map +1 -0
  112. package/dist/transform.js +412 -0
  113. package/dist/transform.js.map +1 -0
  114. package/dist/tridiagonal.d.ts +52 -0
  115. package/dist/tridiagonal.d.ts.map +1 -0
  116. package/dist/tridiagonal.js +90 -0
  117. package/dist/tridiagonal.js.map +1 -0
  118. package/dist/upload.d.ts +55 -0
  119. package/dist/upload.d.ts.map +1 -0
  120. package/dist/upload.js +129 -0
  121. package/dist/upload.js.map +1 -0
  122. package/dist/vec2-array-componentwise.d.ts +207 -0
  123. package/dist/vec2-array-componentwise.d.ts.map +1 -0
  124. package/dist/vec2-array-componentwise.js +472 -0
  125. package/dist/vec2-array-componentwise.js.map +1 -0
  126. package/dist/vec2-array.d.ts +53 -0
  127. package/dist/vec2-array.d.ts.map +1 -0
  128. package/dist/vec2-array.js +123 -0
  129. package/dist/vec2-array.js.map +1 -0
  130. package/dist/vec2-componentwise.d.ts +311 -0
  131. package/dist/vec2-componentwise.d.ts.map +1 -0
  132. package/dist/vec2-componentwise.js +542 -0
  133. package/dist/vec2-componentwise.js.map +1 -0
  134. package/dist/vec2.d.ts +97 -82
  135. package/dist/vec2.d.ts.map +1 -1
  136. package/dist/vec2.js +121 -216
  137. package/dist/vec2.js.map +1 -1
  138. package/dist/vec3-array-componentwise.d.ts +207 -0
  139. package/dist/vec3-array-componentwise.d.ts.map +1 -0
  140. package/dist/vec3-array-componentwise.js +510 -0
  141. package/dist/vec3-array-componentwise.js.map +1 -0
  142. package/dist/vec3-array.d.ts +102 -0
  143. package/dist/vec3-array.d.ts.map +1 -0
  144. package/dist/vec3-array.js +299 -0
  145. package/dist/vec3-array.js.map +1 -0
  146. package/dist/vec3-componentwise.d.ts +310 -0
  147. package/dist/vec3-componentwise.d.ts.map +1 -0
  148. package/dist/vec3-componentwise.js +594 -0
  149. package/dist/vec3-componentwise.js.map +1 -0
  150. package/dist/vec3.d.ts +177 -87
  151. package/dist/vec3.d.ts.map +1 -1
  152. package/dist/vec3.js +391 -272
  153. package/dist/vec3.js.map +1 -1
  154. package/dist/vec4-array-componentwise.d.ts +198 -0
  155. package/dist/vec4-array-componentwise.d.ts.map +1 -0
  156. package/dist/vec4-array-componentwise.js +521 -0
  157. package/dist/vec4-array-componentwise.js.map +1 -0
  158. package/dist/vec4-array.d.ts +12 -0
  159. package/dist/vec4-array.d.ts.map +1 -0
  160. package/dist/vec4-array.js +43 -0
  161. package/dist/vec4-array.js.map +1 -0
  162. package/dist/vec4-componentwise.d.ts +299 -0
  163. package/dist/vec4-componentwise.d.ts.map +1 -0
  164. package/dist/vec4-componentwise.js +637 -0
  165. package/dist/vec4-componentwise.js.map +1 -0
  166. package/dist/vec4.d.ts +59 -53
  167. package/dist/vec4.d.ts.map +1 -1
  168. package/dist/vec4.js +74 -249
  169. package/dist/vec4.js.map +1 -1
  170. package/dist/view-basis.d.ts +15 -0
  171. package/dist/view-basis.d.ts.map +1 -0
  172. package/dist/view-basis.js +29 -0
  173. package/dist/view-basis.js.map +1 -0
  174. package/dist/viewport.d.ts +114 -0
  175. package/dist/viewport.d.ts.map +1 -0
  176. package/dist/viewport.js +250 -0
  177. package/dist/viewport.js.map +1 -0
  178. package/package.json +19 -9
@@ -0,0 +1,299 @@
1
+ // Generated from scripts/templates/mat-componentwise.liquid by scripts/generate-componentwise.ts. Do not edit.
2
+ import { isCloseTo, numberAtOrNaN } from "@ac-kit/core";
3
+ /**
4
+ * Every creator copies this array, which holds non-integer doubles and is never
5
+ * exposed: nothing a caller does can change the element kind it copies.
6
+ */
7
+ const TEMPLATE_ = [
8
+ 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5,
9
+ ];
10
+ /**
11
+ * Creates the identity matrix.
12
+ *
13
+ * Allocates; keep it out of hot loops.
14
+ */
15
+ export function mat3x3Create() {
16
+ const out = TEMPLATE_.slice();
17
+ out[0] = 1;
18
+ out[1] = 0;
19
+ out[2] = 0;
20
+ out[3] = 0;
21
+ out[4] = 1;
22
+ out[5] = 0;
23
+ out[6] = 0;
24
+ out[7] = 0;
25
+ out[8] = 1;
26
+ return out;
27
+ }
28
+ /**
29
+ * Creates the matrix from its entries in storage order, the columns one after
30
+ * the other (`m10` is row 1, column 0): the order of the type's labels, of a
31
+ * `Float64Array` and of a GPU buffer. See {@link mat3x3OfRows} for the order of
32
+ * a textbook.
33
+ *
34
+ * Allocates; keep it out of hot loops.
35
+ */
36
+ export function mat3x3Of(m00, m10, m20, m01, m11, m21, m02, m12, m22) {
37
+ const out = TEMPLATE_.slice();
38
+ out[0] = m00;
39
+ out[1] = m10;
40
+ out[2] = m20;
41
+ out[3] = m01;
42
+ out[4] = m11;
43
+ out[5] = m21;
44
+ out[6] = m02;
45
+ out[7] = m12;
46
+ out[8] = m22;
47
+ return out;
48
+ }
49
+ /**
50
+ * Creates the matrix from its entries row by row, as a matrix is written on
51
+ * paper: the first 3 arguments are the first row.
52
+ *
53
+ * Allocates; keep it out of hot loops.
54
+ */
55
+ export function mat3x3OfRows(m00, m01, m02, m10, m11, m12, m20, m21, m22) {
56
+ const out = TEMPLATE_.slice();
57
+ out[0] = m00;
58
+ out[3] = m01;
59
+ out[6] = m02;
60
+ out[1] = m10;
61
+ out[4] = m11;
62
+ out[7] = m12;
63
+ out[2] = m20;
64
+ out[5] = m21;
65
+ out[8] = m22;
66
+ return out;
67
+ }
68
+ /**
69
+ * Creates a copy of `m`. Like every creator it starts from a clean array.
70
+ *
71
+ * Allocates; keep it out of hot loops.
72
+ */
73
+ export function mat3x3Clone(m) {
74
+ const out = TEMPLATE_.slice();
75
+ out[0] = m[0];
76
+ out[1] = m[1];
77
+ out[2] = m[2];
78
+ out[3] = m[3];
79
+ out[4] = m[4];
80
+ out[5] = m[5];
81
+ out[6] = m[6];
82
+ out[7] = m[7];
83
+ out[8] = m[8];
84
+ return out;
85
+ }
86
+ /**
87
+ * The checked way in from untyped data (JSON, messages, arrays of unknown
88
+ * origin): `source[offset … offset + 9)` copied into `out`, each element that
89
+ * is not a number written as `NaN`, an index below zero or at or past
90
+ * `source.length` too, so `out` never holds a non-number. Test the result with
91
+ * {@link mat3x3IsFinite} when `NaN` must not get through. A cold path. O(1).
92
+ *
93
+ * `source` may be `out` itself: the 9 elements are read before the first write.
94
+ *
95
+ * @param out The matrix to fill.
96
+ * @param source The array to read, of any length and any content, the entries
97
+ * in storage order.
98
+ * @param offset The index of the first entry in `source`.
99
+ * @returns `out`.
100
+ */
101
+ export function mat3x3FromArray(out, source, offset = 0) {
102
+ const m00 = numberAtOrNaN(source, offset);
103
+ const m10 = numberAtOrNaN(source, offset + 1);
104
+ const m20 = numberAtOrNaN(source, offset + 2);
105
+ const m01 = numberAtOrNaN(source, offset + 3);
106
+ const m11 = numberAtOrNaN(source, offset + 4);
107
+ const m21 = numberAtOrNaN(source, offset + 5);
108
+ const m02 = numberAtOrNaN(source, offset + 6);
109
+ const m12 = numberAtOrNaN(source, offset + 7);
110
+ const m22 = numberAtOrNaN(source, offset + 8);
111
+ out[0] = m00;
112
+ out[1] = m10;
113
+ out[2] = m20;
114
+ out[3] = m01;
115
+ out[4] = m11;
116
+ out[5] = m21;
117
+ out[6] = m02;
118
+ out[7] = m12;
119
+ out[8] = m22;
120
+ return out;
121
+ }
122
+ /** Writes the matrix with the entries in storage order into `out`. */
123
+ export function mat3x3Set(out, m00, m10, m20, m01, m11, m21, m02, m12, m22) {
124
+ out[0] = m00;
125
+ out[1] = m10;
126
+ out[2] = m20;
127
+ out[3] = m01;
128
+ out[4] = m11;
129
+ out[5] = m21;
130
+ out[6] = m02;
131
+ out[7] = m12;
132
+ out[8] = m22;
133
+ return out;
134
+ }
135
+ /** Writes the matrix with the entries given row by row into `out`. */
136
+ export function mat3x3SetRows(out, m00, m01, m02, m10, m11, m12, m20, m21, m22) {
137
+ out[0] = m00;
138
+ out[3] = m01;
139
+ out[6] = m02;
140
+ out[1] = m10;
141
+ out[4] = m11;
142
+ out[7] = m12;
143
+ out[2] = m20;
144
+ out[5] = m21;
145
+ out[8] = m22;
146
+ return out;
147
+ }
148
+ /** Writes a copy of `m` into `out`. */
149
+ export function mat3x3Copy(out, m) {
150
+ const m00 = m[0];
151
+ const m10 = m[1];
152
+ const m20 = m[2];
153
+ const m01 = m[3];
154
+ const m11 = m[4];
155
+ const m21 = m[5];
156
+ const m02 = m[6];
157
+ const m12 = m[7];
158
+ const m22 = m[8];
159
+ out[0] = m00;
160
+ out[1] = m10;
161
+ out[2] = m20;
162
+ out[3] = m01;
163
+ out[4] = m11;
164
+ out[5] = m21;
165
+ out[6] = m02;
166
+ out[7] = m12;
167
+ out[8] = m22;
168
+ return out;
169
+ }
170
+ /** Writes the identity matrix into `out`. */
171
+ export function mat3x3Identity(out) {
172
+ out[0] = 1;
173
+ out[1] = 0;
174
+ out[2] = 0;
175
+ out[3] = 0;
176
+ out[4] = 1;
177
+ out[5] = 0;
178
+ out[6] = 0;
179
+ out[7] = 0;
180
+ out[8] = 1;
181
+ return out;
182
+ }
183
+ /** Writes the zero matrix into `out`. */
184
+ export function mat3x3Zero(out) {
185
+ out[0] = 0;
186
+ out[1] = 0;
187
+ out[2] = 0;
188
+ out[3] = 0;
189
+ out[4] = 0;
190
+ out[5] = 0;
191
+ out[6] = 0;
192
+ out[7] = 0;
193
+ out[8] = 0;
194
+ return out;
195
+ }
196
+ /** Writes `a + b`, entry by entry, into `out`. `out` may be `a` or `b`. */
197
+ export function mat3x3Add(out, a, b) {
198
+ out[0] = a[0] + b[0];
199
+ out[1] = a[1] + b[1];
200
+ out[2] = a[2] + b[2];
201
+ out[3] = a[3] + b[3];
202
+ out[4] = a[4] + b[4];
203
+ out[5] = a[5] + b[5];
204
+ out[6] = a[6] + b[6];
205
+ out[7] = a[7] + b[7];
206
+ out[8] = a[8] + b[8];
207
+ return out;
208
+ }
209
+ /** Writes `a − b`, entry by entry, into `out`. `out` may be `a` or `b`. */
210
+ export function mat3x3Subtract(out, a, b) {
211
+ out[0] = a[0] - b[0];
212
+ out[1] = a[1] - b[1];
213
+ out[2] = a[2] - b[2];
214
+ out[3] = a[3] - b[3];
215
+ out[4] = a[4] - b[4];
216
+ out[5] = a[5] - b[5];
217
+ out[6] = a[6] - b[6];
218
+ out[7] = a[7] - b[7];
219
+ out[8] = a[8] - b[8];
220
+ return out;
221
+ }
222
+ /** Writes `m · scalar`, every entry multiplied, into `out`. `out` may be `m`. */
223
+ export function mat3x3MultiplyScalar(out, m, scalar) {
224
+ out[0] = m[0] * scalar;
225
+ out[1] = m[1] * scalar;
226
+ out[2] = m[2] * scalar;
227
+ out[3] = m[3] * scalar;
228
+ out[4] = m[4] * scalar;
229
+ out[5] = m[5] * scalar;
230
+ out[6] = m[6] * scalar;
231
+ out[7] = m[7] * scalar;
232
+ out[8] = m[8] * scalar;
233
+ return out;
234
+ }
235
+ /** Writes `−m`, every entry negated, into `out`. `out` may be `m`. */
236
+ export function mat3x3Negate(out, m) {
237
+ out[0] = -m[0];
238
+ out[1] = -m[1];
239
+ out[2] = -m[2];
240
+ out[3] = -m[3];
241
+ out[4] = -m[4];
242
+ out[5] = -m[5];
243
+ out[6] = -m[6];
244
+ out[7] = -m[7];
245
+ out[8] = -m[8];
246
+ return out;
247
+ }
248
+ /**
249
+ * Exact entry-wise equality: `−0` equals `+0`, and `NaN` equals nothing, itself
250
+ * included. See {@link mat3x3IsClose} for a tolerant test.
251
+ */
252
+ export function mat3x3Equals(a, b) {
253
+ return (a[0] === b[0] &&
254
+ a[1] === b[1] &&
255
+ a[2] === b[2] &&
256
+ a[3] === b[3] &&
257
+ a[4] === b[4] &&
258
+ a[5] === b[5] &&
259
+ a[6] === b[6] &&
260
+ a[7] === b[7] &&
261
+ a[8] === b[8]);
262
+ }
263
+ /**
264
+ * Entry-wise approximate equality, each pair compared by `@ac-kit/core`'s
265
+ * `isCloseTo` with `options`: none means exact.
266
+ *
267
+ * Not transitive, so it is not an equality in the sense a `Set` or `Map` needs,
268
+ * and never a basis for ordering — use {@link mat3x3Equals} there. The tolerance
269
+ * is required: a matrix carries no units of its own, so only the caller knows
270
+ * what counts as close.
271
+ */
272
+ export function mat3x3IsClose(a, b, options) {
273
+ return (isCloseTo(a[0], b[0], options) &&
274
+ isCloseTo(a[1], b[1], options) &&
275
+ isCloseTo(a[2], b[2], options) &&
276
+ isCloseTo(a[3], b[3], options) &&
277
+ isCloseTo(a[4], b[4], options) &&
278
+ isCloseTo(a[5], b[5], options) &&
279
+ isCloseTo(a[6], b[6], options) &&
280
+ isCloseTo(a[7], b[7], options) &&
281
+ isCloseTo(a[8], b[8], options));
282
+ }
283
+ /**
284
+ * Whether every entry is a finite number: the check to run after parsing
285
+ * untrusted data or before an upload, as operations never check. An entry that
286
+ * is not a number at all counts as not finite.
287
+ */
288
+ export function mat3x3IsFinite(m) {
289
+ return (Number.isFinite(m[0]) &&
290
+ Number.isFinite(m[1]) &&
291
+ Number.isFinite(m[2]) &&
292
+ Number.isFinite(m[3]) &&
293
+ Number.isFinite(m[4]) &&
294
+ Number.isFinite(m[5]) &&
295
+ Number.isFinite(m[6]) &&
296
+ Number.isFinite(m[7]) &&
297
+ Number.isFinite(m[8]));
298
+ }
299
+ //# sourceMappingURL=mat3x3-componentwise.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mat3x3-componentwise.js","sourceRoot":"","sources":["../src/mat3x3-componentwise.ts"],"names":[],"mappings":"AAAA,+GAA+G;AAE/G,OAAO,EAAE,SAAS,EAAyB,aAAa,EAAE,MAAM,cAAc,CAAC;AAI/E;;;GAGG;AACH,MAAM,SAAS,GAAsB;IACpC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG;CAC3C,CAAC;AAEF;;;;GAIG;AACH,MAAM,UAAU,YAAY;IAC3B,MAAM,GAAG,GAAG,SAAS,CAAC,KAAK,EAAY,CAAC;IACxC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IACX,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IACX,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IACX,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IACX,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IACX,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IACX,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IACX,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IACX,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IACX,OAAO,GAAG,CAAC;AACZ,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,QAAQ,CACvB,GAAW,EACX,GAAW,EACX,GAAW,EACX,GAAW,EACX,GAAW,EACX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CAAC,CAAC,EAAE,OAAO,CAAC;QAC9B,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC;QAC9B,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC;QAC9B,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC;QAC9B,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAC9B,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,CAAiB;IAC/C,OAAO,CACN,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACrB,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACrB,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACrB,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACrB,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACrB,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACrB,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACrB,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACrB,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CACrB,CAAC;AACH,CAAC"}
package/dist/mat3x3.d.ts CHANGED
@@ -1,57 +1,162 @@
1
- import { type IsCloseToOptions } from "@ac-kit/core";
2
- import { Vec3 } from "./vec3.js";
3
- export type Mat3x3 = [
4
- [
5
- number,
6
- number,
7
- number
8
- ],
9
- [
10
- number,
11
- number,
12
- number
13
- ],
14
- [
15
- number,
16
- number,
17
- number
18
- ]
19
- ];
20
- export declare const MAT3X3_ZERO: [[0, 0, 0], [0, 0, 0], [0, 0, 0]];
21
- export declare const MAT3X3_IDENTITY: [[1, 0, 0], [0, 1, 0], [0, 0, 1]];
22
- export declare function mat3x3Add(a: Mat3x3, b: Mat3x3): Mat3x3;
23
- export declare function mat3x3Determinant(matrix: Mat3x3): number;
24
- /** Exact element-wise equality. See {@link mat3x3IsClose} for a tolerant test. */
25
- export declare function mat3x3Equals(a: Mat3x3, b: Mat3x3): boolean;
26
- /**
27
- * Element-wise approximate equality.
1
+ import type { ReadonlyQuaternion } from "@ac-kit/math-complex";
2
+ import type { Brand_ } from "./_brand.js";
3
+ import type { ReadonlyAffine2 } from "./affine2.js";
4
+ import type { ReadonlyAffine3 } from "./affine3.js";
5
+ import type { ReadonlyMat4x4 } from "./mat4x4.js";
6
+ import type { ReadonlyVec3 } from "./vec3.js";
7
+ /**
8
+ * A 3 × 3 matrix, stored flat and column-major, `[m00, m10, m20, m01, m11, m21,
9
+ * m02, m12, m22]`: entry (row `r`, column `c`) is at index `3c + r`, as WebGL,
10
+ * WebGPU and WGSL lay matrices out (a GPU pads each column to four numbers on
11
+ * upload, not here). A plain array of nine binary64 numbers carrying a
12
+ * type-level brand. Operations treat vectors as columns, so
13
+ * `mat3x3Multiply(out, a, b)` is `a · b` and applies `b` first.
28
14
  *
29
- * Not transitive, so it is not an equality in the sense a `Set` or `Map` needs,
30
- * and never a basis for ordering — use {@link mat3x3Equals} there.
15
+ * Only {@link mat3x3Create}, {@link mat3x3Of}, {@link mat3x3OfRows},
16
+ * {@link mat3x3Clone}, {@link mat3x3FromArray} and the functions that write an
17
+ * `out` make one; see {@link Vec3} for the rules that bind callers who bypass
18
+ * the types.
19
+ */
20
+ export type Mat3x3 = [
21
+ m00: number,
22
+ m10: number,
23
+ m20: number,
24
+ m01: number,
25
+ m11: number,
26
+ m21: number,
27
+ m02: number,
28
+ m12: number,
29
+ m22: number
30
+ ] & Brand_<"Mat3x3">;
31
+ /** A {@link Mat3x3} that is only read. */
32
+ export type ReadonlyMat3x3 = readonly [
33
+ m00: number,
34
+ m10: number,
35
+ m20: number,
36
+ m01: number,
37
+ m11: number,
38
+ m21: number,
39
+ m02: number,
40
+ m12: number,
41
+ m22: number
42
+ ] & Brand_<"Mat3x3">;
43
+ /**
44
+ * Writes the product `a · b` into `out`: `b` is applied first. Not commutative.
45
+ * Plain arithmetic: each entry is within three roundings of the exact value
46
+ * relative to the sum of the absolute values of its terms, so it can lose every
47
+ * digit where the terms cancel (see {@link mat3x3MultiplyPrecise}). `out` may be
48
+ * `a` or `b`.
49
+ */
50
+ export declare function mat3x3Multiply(out: Mat3x3, a: ReadonlyMat3x3, b: ReadonlyMat3x3): Mat3x3;
51
+ /**
52
+ * {@link mat3x3Multiply} with each entry a compensated dot product, as accurate
53
+ * as one in doubled precision rounded once. `out` may be `a` or `b`.
54
+ */
55
+ export declare function mat3x3MultiplyPrecise(out: Mat3x3, a: ReadonlyMat3x3, b: ReadonlyMat3x3): Mat3x3;
56
+ /**
57
+ * Writes `m · diag(v)` into `out`: column `c` of `m` multiplied by `v[c]`.
58
+ * `out` may be `m`.
59
+ */
60
+ export declare function mat3x3ScaleColumns(out: Mat3x3, m: ReadonlyMat3x3, v: ReadonlyVec3): Mat3x3;
61
+ /**
62
+ * Writes `diag(v) · m` into `out`: row `r` of `m` multiplied by `v[r]`. `out`
63
+ * may be `m`.
64
+ */
65
+ export declare function mat3x3ScaleRows(out: Mat3x3, m: ReadonlyMat3x3, v: ReadonlyVec3): Mat3x3;
66
+ /** Writes the transpose of `m` into `out`. `out` may be `m`. */
67
+ export declare function mat3x3Transpose(out: Mat3x3, m: ReadonlyMat3x3): Mat3x3;
68
+ /**
69
+ * The determinant, by the rule of Sarrus-style cofactor expansion along the
70
+ * first column, in plain arithmetic: the signed volume scale of the
71
+ * transformation.
72
+ */
73
+ export declare function mat3x3Determinant(m: ReadonlyMat3x3): number;
74
+ /**
75
+ * Writes the inverse of `m` into `out` and returns `true`. When `m` has no
76
+ * inverse a binary64 number can hold (the determinant is zero, an entry is not
77
+ * finite, or an entry of the inverse overflows) `out` is filled with `NaN` and
78
+ * the result is `false`: `true` always comes with a finite `out`, never a stale
79
+ * or partial matrix, and nothing throws. A matrix of very large or very small
80
+ * entries, whose determinant or cofactors overflow or underflow, is inverted
81
+ * all the same (`diag(1e-100)` gives `diag(1e100)`, and `diag(1e160, 1e160,
82
+ * 1e-160)` gives `diag(1e-160, 1e-160, 1e160)`), by scaling its rows and
83
+ * columns by powers of two first. Plain arithmetic (the adjugate over the
84
+ * determinant); when the cofactors of the scaled matrix still cancel to a zero
85
+ * determinant (`[[1, 1, 0], [1, 1, 2^-500], [0, 2^-500, 1]]`, of determinant
86
+ * `-2^-1000`), or a forward error bound of the expansion (Higham, "Accuracy and
87
+ * Stability of Numerical Algorithms", §3.1) does not keep the determinant
88
+ * within `2^-41` of itself and the cofactors within `2^-41 / 3` of the largest
89
+ * of them (a matrix nearly singular, or whose cofactors cancel to a rounding
90
+ * residue) unless the expansion rounded nowhere, LU factorisation with partial
91
+ * pivoting (Golub and Van Loan, §3.4), backward stable, inverts it. An
92
+ * elimination without rounding proves the matrix singular or invertible; one
93
+ * that rounds is settled in exact arithmetic, as is an inverse whose
94
+ * scaled-back entries overflow or come within their error bound of the overflow
95
+ * threshold (`diag(2^-1024, 4237, 1)`), and a matrix whose scaling rounds an
96
+ * entry (one more than about `2^1074` below the largest of its column once its
97
+ * row is scaled, `2^-200` in `[[2^900, 2^900, 0], [2^900, 2^900, 2^-200], [0,
98
+ * 2^900, 2^900]]`). So `false` is never a rounding artefact: `m` is singular,
99
+ * an entry is not finite, or an entry of its inverse, rounded once, is beyond
100
+ * `Number.MAX_VALUE`. `true` comes with an inverse backward stable for `m` with
101
+ * its rows and columns so scaled (a normwise backward error of about `2^-40`),
102
+ * whose entries far below the largest of that scaled inverse may carry no
103
+ * correct digit, as in any elimination. Allocates nothing unless the exact
104
+ * settlement runs: for a matrix of condition number beyond about `2^52`, an
105
+ * inverse that overflows, or an entry the scaling rounds. `out` may be `m`.
106
+ */
107
+ export declare function mat3x3Invert(out: Mat3x3, m: ReadonlyMat3x3): boolean;
108
+ /**
109
+ * Writes the rotation by `angle` radians about the x axis (right-hand rule)
110
+ * into `out`.
111
+ */
112
+ export declare function mat3x3FromRotationX(out: Mat3x3, angle: number): Mat3x3;
113
+ /**
114
+ * Writes the rotation by `angle` radians about the y axis (right-hand rule)
115
+ * into `out`.
116
+ */
117
+ export declare function mat3x3FromRotationY(out: Mat3x3, angle: number): Mat3x3;
118
+ /**
119
+ * Writes the rotation by `angle` radians about the z axis (right-hand rule)
120
+ * into `out`.
121
+ */
122
+ export declare function mat3x3FromRotationZ(out: Mat3x3, angle: number): Mat3x3;
123
+ /** Writes the scale `diag(scale)` into `out`. */
124
+ export declare function mat3x3FromScale(out: Mat3x3, scale: ReadonlyVec3): Mat3x3;
125
+ /**
126
+ * Writes the rotation by `angle` radians about the unit vector `axis`
127
+ * (right-hand rule, Rodrigues' formula) into `out`. `axis` is not normalised
128
+ * here: for any other length the matrix is not a rotation.
129
+ */
130
+ export declare function mat3x3FromAxisAngle(out: Mat3x3, axis: ReadonlyVec3, angle: number): Mat3x3;
131
+ /**
132
+ * Writes the rotation of the unit quaternion `q` into `out`. `q` must be unit
133
+ * length; it is not normalised here.
31
134
  */
32
- export declare function mat3x3IsClose(a: Mat3x3, b: Mat3x3, tolerance: IsCloseToOptions): boolean;
135
+ export declare function mat3x3FromQuaternion(out: Mat3x3, q: ReadonlyQuaternion): Mat3x3;
136
+ /** Writes the upper-left 3 × 3 block of `m`: its linear part, into `out`. */
137
+ export declare function mat3x3FromMat4x4(out: Mat3x3, m: ReadonlyMat4x4): Mat3x3;
138
+ /** Writes the linear part of `transform`, without its translation, into `out`. */
139
+ export declare function mat3x3FromAffine3(out: Mat3x3, transform: ReadonlyAffine3): Mat3x3;
33
140
  /**
34
- * Creates a 3×3 rotation matrix that rotates around the X axis by the given
35
- * angle in radians (right-hand rule).
141
+ * Writes the 2D affine `transform` as the homogeneous 3 × 3 matrix `[a, c, e;
142
+ * b, d, f; 0, 0, 1]` into `out`: the bottom row, which an {@link Affine2} does
143
+ * not store, is `0, 0, 1`.
36
144
  */
37
- export declare function mat3x3FromRotationX(angle: number): Mat3x3;
145
+ export declare function mat3x3FromAffine2(out: Mat3x3, transform: ReadonlyAffine2): Mat3x3;
38
146
  /**
39
- * Creates a 3×3 rotation matrix that rotates around the Y axis by the given
40
- * angle in radians (right-hand rule).
147
+ * Writes the normal matrix of `m` into `out`: the inverse transpose of its
148
+ * upper-left 3 × 3 block, the matrix that carries surface normals through `m`
149
+ * (they stay perpendicular to the surface even under a non-uniform scale; scale
150
+ * the result to unit length afterwards). Returns `false` when that block has no
151
+ * finite inverse (it is singular, not finite, or the inverse overflows): `out`
152
+ * then holds `NaN` throughout, never a stale or partial matrix, and nothing
153
+ * throws. Plain arithmetic, as {@link mat3x3Invert}.
41
154
  */
42
- export declare function mat3x3FromRotationY(angle: number): Mat3x3;
155
+ export declare function mat3x3NormalFromMat4x4(out: Mat3x3, m: ReadonlyMat4x4): boolean;
43
156
  /**
44
- * Creates a 3×3 rotation matrix that rotates around the Z axis by the given
45
- * angle in radians (right-hand rule).
157
+ * Writes the normal matrix of `transform` into `out`: the inverse transpose of
158
+ * its linear part, as {@link mat3x3NormalFromMat4x4}. Returns `false`, with
159
+ * `NaN` throughout, when the linear part has no finite inverse.
46
160
  */
47
- export declare function mat3x3FromRotationZ(angle: number): Mat3x3;
48
- export declare function mat3x3FromScale(sx: number, sy: number, sz: number): Mat3x3;
49
- export declare function mat3x3Invert(matrix: Mat3x3): Mat3x3;
50
- export declare function mat3x3Multiply(a: Mat3x3, b: Mat3x3): Mat3x3;
51
- export declare function mat3x3MultiplyCols(matrix: Mat3x3, vector: Vec3): Mat3x3;
52
- export declare function mat3x3MultiplyRows(matrix: Mat3x3, vector: Vec3): Mat3x3;
53
- export declare function mat3x3MultiplyScalar(matrix: Mat3x3, scalar: number): Mat3x3;
54
- export declare function mat3x3Negate(matrix: Mat3x3): Mat3x3;
55
- export declare function mat3x3Sub(a: Mat3x3, b: Mat3x3): Mat3x3;
56
- export declare function mat3x3Transpose(matrix: Mat3x3): Mat3x3;
161
+ export declare function mat3x3NormalFromAffine3(out: Mat3x3, transform: ReadonlyAffine3): boolean;
57
162
  //# sourceMappingURL=mat3x3.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mat3x3.d.ts","sourceRoot":"","sources":["../src/mat3x3.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAGhE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,MAAM,MAAM,MAAM,GAAG;IACpB;QAAC,MAAM;QAAE,MAAM;QAAE,MAAM;KAAC;IACxB;QAAC,MAAM;QAAE,MAAM;QAAE,MAAM;KAAC;IACxB;QAAC,MAAM;QAAE,MAAM;QAAE,MAAM;KAAC;CACxB,CAAC;AAEF,eAAO,MAAM,WAAW,mCAIG,CAAC;AAC5B,eAAO,MAAM,eAAe,mCAID,CAAC;AAE5B,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAMtD;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAWxD;AAED,kFAAkF;AAClF,wBAAgB,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAY1D;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAC5B,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,SAAS,EAAE,gBAAgB,GACzB,OAAO,CAST;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAQzD;AAED;;;GAGG;AACH,wBAA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