@thi.ng/matrices 1.0.4 → 2.0.3

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 (118) hide show
  1. package/CHANGELOG.md +68 -97
  2. package/README.md +26 -16
  3. package/add.d.ts +1 -1
  4. package/add.js +2 -2
  5. package/addn.d.ts +1 -1
  6. package/addn.js +2 -2
  7. package/alignment-quat.d.ts +1 -1
  8. package/alignment-quat.js +5 -2
  9. package/column.d.ts +1 -1
  10. package/column.js +2 -1
  11. package/compile/emit.d.ts +4 -0
  12. package/{internal/codegen.js → compile/emit.js} +2 -1
  13. package/concat.d.ts +1 -1
  14. package/concat.js +1 -1
  15. package/conjugate.d.ts +1 -1
  16. package/conjugate.js +1 -1
  17. package/constants.d.ts +1 -1
  18. package/determinant.d.ts +1 -1
  19. package/determinant.js +1 -1
  20. package/diag.d.ts +5 -5
  21. package/diag.js +2 -1
  22. package/div.d.ts +1 -1
  23. package/div.js +2 -2
  24. package/divn.d.ts +1 -1
  25. package/divn.js +2 -2
  26. package/frustum.d.ts +1 -1
  27. package/frustum.js +2 -2
  28. package/identity.d.ts +5 -5
  29. package/identity.js +3 -3
  30. package/index.d.ts +56 -56
  31. package/index.js +56 -56
  32. package/invert.d.ts +2 -2
  33. package/invert.js +5 -2
  34. package/lookat.d.ts +2 -2
  35. package/lookat.js +5 -1
  36. package/m22-m23.d.ts +1 -1
  37. package/m22-m23.js +1 -1
  38. package/m23-m22.d.ts +1 -1
  39. package/m23-m22.js +1 -1
  40. package/m23-m44.d.ts +1 -1
  41. package/m23-m44.js +1 -1
  42. package/m33-m44.d.ts +1 -1
  43. package/m33-m44.js +1 -1
  44. package/m44-m33.d.ts +1 -1
  45. package/m44-m33.js +1 -1
  46. package/matn.d.ts +1 -1
  47. package/matn.js +1 -1
  48. package/matv.js +1 -1
  49. package/mixq.d.ts +2 -2
  50. package/mixq.js +4 -1
  51. package/mul.d.ts +1 -1
  52. package/mul.js +2 -2
  53. package/mulm.d.ts +5 -5
  54. package/mulm.js +3 -1
  55. package/muln.d.ts +1 -1
  56. package/muln.js +2 -2
  57. package/mulq.d.ts +1 -1
  58. package/mulq.js +1 -1
  59. package/mulv.d.ts +2 -2
  60. package/mulv.js +3 -1
  61. package/mulvm.d.ts +2 -2
  62. package/mulvm.js +3 -1
  63. package/normal-mat.d.ts +1 -1
  64. package/normal-mat.js +3 -3
  65. package/orthagonal.d.ts +1 -1
  66. package/orthagonal.js +2 -1
  67. package/ortho.d.ts +1 -1
  68. package/ortho.js +1 -1
  69. package/outer-product.d.ts +1 -1
  70. package/outer-product.js +2 -1
  71. package/package.json +199 -26
  72. package/perspective.d.ts +1 -1
  73. package/perspective.js +1 -1
  74. package/project.d.ts +2 -2
  75. package/project.js +3 -3
  76. package/quat-axis-angle.d.ts +1 -1
  77. package/quat-axis-angle.js +2 -2
  78. package/quat-euler.d.ts +7 -7
  79. package/quat-euler.js +3 -3
  80. package/quat-m33.d.ts +1 -1
  81. package/quat-m33.js +1 -1
  82. package/quat-m44.d.ts +3 -3
  83. package/quat-m44.js +2 -1
  84. package/rotation-around-axis.d.ts +2 -2
  85. package/rotation-around-axis.js +4 -3
  86. package/rotation.d.ts +1 -1
  87. package/rotation.js +2 -2
  88. package/row.d.ts +5 -5
  89. package/row.js +2 -1
  90. package/scale-center.d.ts +2 -2
  91. package/scale-center.js +4 -4
  92. package/scale.d.ts +1 -1
  93. package/scale.js +2 -2
  94. package/set.d.ts +1 -1
  95. package/set.js +3 -1
  96. package/shear.d.ts +1 -1
  97. package/shear.js +1 -1
  98. package/skew.d.ts +1 -1
  99. package/skew.js +1 -1
  100. package/sub.d.ts +1 -1
  101. package/sub.js +2 -2
  102. package/subn.d.ts +1 -1
  103. package/subn.js +2 -2
  104. package/trace.d.ts +1 -1
  105. package/trace.js +2 -2
  106. package/transform.d.ts +1 -1
  107. package/transform.js +7 -7
  108. package/translation.d.ts +2 -2
  109. package/translation.js +1 -1
  110. package/transpose.d.ts +1 -1
  111. package/transpose.js +1 -1
  112. package/viewport.d.ts +1 -1
  113. package/viewport.js +3 -3
  114. package/internal/codegen.d.ts +0 -4
  115. package/lib/index.js +0 -733
  116. package/lib/index.js.map +0 -1
  117. package/lib/index.umd.js +0 -1
  118. package/lib/index.umd.js.map +0 -1
package/index.d.ts CHANGED
@@ -1,57 +1,57 @@
1
- export * from "./api";
2
- export * from "./constants";
3
- export * from "./internal/codegen";
4
- export * from "./add";
5
- export * from "./addn";
6
- export * from "./alignment-quat";
7
- export * from "./column";
8
- export * from "./concat";
9
- export * from "./conjugate";
10
- export * from "./determinant";
11
- export * from "./diag";
12
- export * from "./div";
13
- export * from "./divn";
14
- export * from "./frustum";
15
- export * from "./identity";
16
- export * from "./invert";
17
- export * from "./lookat";
18
- export * from "./m22-m23";
19
- export * from "./m23-m22";
20
- export * from "./m23-m44";
21
- export * from "./m33-m44";
22
- export * from "./m44-m33";
23
- export * from "./matn";
24
- export * from "./matv";
25
- export * from "./mixq";
26
- export * from "./mul";
27
- export * from "./mulm";
28
- export * from "./muln";
29
- export * from "./mulq";
30
- export * from "./mulv";
31
- export * from "./mulvm";
32
- export * from "./normal-mat";
33
- export * from "./ortho";
34
- export * from "./orthagonal";
35
- export * from "./outer-product";
36
- export * from "./perspective";
37
- export * from "./project";
38
- export * from "./quat-axis-angle";
39
- export * from "./quat-euler";
40
- export * from "./quat-m33";
41
- export * from "./quat-m44";
42
- export * from "./rotation-around-axis";
43
- export * from "./rotation";
44
- export * from "./row";
45
- export * from "./scale";
46
- export * from "./scale-center";
47
- export * from "./set";
48
- export * from "./shear";
49
- export * from "./skew";
50
- export * from "./sub";
51
- export * from "./subn";
52
- export * from "./trace";
53
- export * from "./translation";
54
- export * from "./transform";
55
- export * from "./transpose";
56
- export * from "./viewport";
1
+ export * from "./api.js";
2
+ export * from "./constants.js";
3
+ export * from "./compile/emit.js";
4
+ export * from "./add.js";
5
+ export * from "./addn.js";
6
+ export * from "./alignment-quat.js";
7
+ export * from "./column.js";
8
+ export * from "./concat.js";
9
+ export * from "./conjugate.js";
10
+ export * from "./determinant.js";
11
+ export * from "./diag.js";
12
+ export * from "./div.js";
13
+ export * from "./divn.js";
14
+ export * from "./frustum.js";
15
+ export * from "./identity.js";
16
+ export * from "./invert.js";
17
+ export * from "./lookat.js";
18
+ export * from "./m22-m23.js";
19
+ export * from "./m23-m22.js";
20
+ export * from "./m23-m44.js";
21
+ export * from "./m33-m44.js";
22
+ export * from "./m44-m33.js";
23
+ export * from "./matn.js";
24
+ export * from "./matv.js";
25
+ export * from "./mixq.js";
26
+ export * from "./mul.js";
27
+ export * from "./mulm.js";
28
+ export * from "./muln.js";
29
+ export * from "./mulq.js";
30
+ export * from "./mulv.js";
31
+ export * from "./mulvm.js";
32
+ export * from "./normal-mat.js";
33
+ export * from "./ortho.js";
34
+ export * from "./orthagonal.js";
35
+ export * from "./outer-product.js";
36
+ export * from "./perspective.js";
37
+ export * from "./project.js";
38
+ export * from "./quat-axis-angle.js";
39
+ export * from "./quat-euler.js";
40
+ export * from "./quat-m33.js";
41
+ export * from "./quat-m44.js";
42
+ export * from "./rotation-around-axis.js";
43
+ export * from "./rotation.js";
44
+ export * from "./row.js";
45
+ export * from "./scale.js";
46
+ export * from "./scale-center.js";
47
+ export * from "./set.js";
48
+ export * from "./shear.js";
49
+ export * from "./skew.js";
50
+ export * from "./sub.js";
51
+ export * from "./subn.js";
52
+ export * from "./trace.js";
53
+ export * from "./translation.js";
54
+ export * from "./transform.js";
55
+ export * from "./transpose.js";
56
+ export * from "./viewport.js";
57
57
  //# sourceMappingURL=index.d.ts.map
package/index.js CHANGED
@@ -1,56 +1,56 @@
1
- export * from "./api";
2
- export * from "./constants";
3
- export * from "./internal/codegen";
4
- export * from "./add";
5
- export * from "./addn";
6
- export * from "./alignment-quat";
7
- export * from "./column";
8
- export * from "./concat";
9
- export * from "./conjugate";
10
- export * from "./determinant";
11
- export * from "./diag";
12
- export * from "./div";
13
- export * from "./divn";
14
- export * from "./frustum";
15
- export * from "./identity";
16
- export * from "./invert";
17
- export * from "./lookat";
18
- export * from "./m22-m23";
19
- export * from "./m23-m22";
20
- export * from "./m23-m44";
21
- export * from "./m33-m44";
22
- export * from "./m44-m33";
23
- export * from "./matn";
24
- export * from "./matv";
25
- export * from "./mixq";
26
- export * from "./mul";
27
- export * from "./mulm";
28
- export * from "./muln";
29
- export * from "./mulq";
30
- export * from "./mulv";
31
- export * from "./mulvm";
32
- export * from "./normal-mat";
33
- export * from "./ortho";
34
- export * from "./orthagonal";
35
- export * from "./outer-product";
36
- export * from "./perspective";
37
- export * from "./project";
38
- export * from "./quat-axis-angle";
39
- export * from "./quat-euler";
40
- export * from "./quat-m33";
41
- export * from "./quat-m44";
42
- export * from "./rotation-around-axis";
43
- export * from "./rotation";
44
- export * from "./row";
45
- export * from "./scale";
46
- export * from "./scale-center";
47
- export * from "./set";
48
- export * from "./shear";
49
- export * from "./skew";
50
- export * from "./sub";
51
- export * from "./subn";
52
- export * from "./trace";
53
- export * from "./translation";
54
- export * from "./transform";
55
- export * from "./transpose";
56
- export * from "./viewport";
1
+ export * from "./api.js";
2
+ export * from "./constants.js";
3
+ export * from "./compile/emit.js";
4
+ export * from "./add.js";
5
+ export * from "./addn.js";
6
+ export * from "./alignment-quat.js";
7
+ export * from "./column.js";
8
+ export * from "./concat.js";
9
+ export * from "./conjugate.js";
10
+ export * from "./determinant.js";
11
+ export * from "./diag.js";
12
+ export * from "./div.js";
13
+ export * from "./divn.js";
14
+ export * from "./frustum.js";
15
+ export * from "./identity.js";
16
+ export * from "./invert.js";
17
+ export * from "./lookat.js";
18
+ export * from "./m22-m23.js";
19
+ export * from "./m23-m22.js";
20
+ export * from "./m23-m44.js";
21
+ export * from "./m33-m44.js";
22
+ export * from "./m44-m33.js";
23
+ export * from "./matn.js";
24
+ export * from "./matv.js";
25
+ export * from "./mixq.js";
26
+ export * from "./mul.js";
27
+ export * from "./mulm.js";
28
+ export * from "./muln.js";
29
+ export * from "./mulq.js";
30
+ export * from "./mulv.js";
31
+ export * from "./mulvm.js";
32
+ export * from "./normal-mat.js";
33
+ export * from "./ortho.js";
34
+ export * from "./orthagonal.js";
35
+ export * from "./outer-product.js";
36
+ export * from "./perspective.js";
37
+ export * from "./project.js";
38
+ export * from "./quat-axis-angle.js";
39
+ export * from "./quat-euler.js";
40
+ export * from "./quat-m33.js";
41
+ export * from "./quat-m44.js";
42
+ export * from "./rotation-around-axis.js";
43
+ export * from "./rotation.js";
44
+ export * from "./row.js";
45
+ export * from "./scale.js";
46
+ export * from "./scale-center.js";
47
+ export * from "./set.js";
48
+ export * from "./shear.js";
49
+ export * from "./skew.js";
50
+ export * from "./sub.js";
51
+ export * from "./subn.js";
52
+ export * from "./trace.js";
53
+ export * from "./translation.js";
54
+ export * from "./transform.js";
55
+ export * from "./transpose.js";
56
+ export * from "./viewport.js";
package/invert.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { ReadonlyVec, Vec } from "@thi.ng/vectors";
2
- import type { MatOpMU, MultiMatOpMU } from "./api";
1
+ import type { ReadonlyVec, Vec } from "@thi.ng/vectors";
2
+ import type { MatOpMU, MultiMatOpMU } from "./api.js";
3
3
  /**
4
4
  * Matrix inversion. Returns `undefined` if matrix is not invertible.
5
5
  * Mutates `mat` if `out` is `null`.
package/invert.js CHANGED
@@ -1,5 +1,8 @@
1
- import { dotC4, dotC6, magSq4, setC, setC4, setC6, vop, } from "@thi.ng/vectors";
2
- import { det44FromCoeffs, detCoeffs44 } from "./determinant";
1
+ import { dotC4, dotC6 } from "@thi.ng/vectors/dotc";
2
+ import { magSq4 } from "@thi.ng/vectors/magsq";
3
+ import { setC, setC4, setC6 } from "@thi.ng/vectors/setc";
4
+ import { vop } from "@thi.ng/vectors/vop";
5
+ import { det44FromCoeffs, detCoeffs44 } from "./determinant.js";
3
6
  const dp4 = dotC4;
4
7
  const dp6 = dotC6;
5
8
  /**
package/lookat.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { ReadonlyVec } from "@thi.ng/vectors";
2
- import type { Mat } from "./api";
1
+ import type { ReadonlyVec } from "@thi.ng/vectors";
2
+ import type { Mat } from "./api.js";
3
3
  /**
4
4
  * Constructs a 4x4 camera matrix for given `eye` position, look-at
5
5
  * `target` (both in world space) and normalized `up` vector. Creates
package/lookat.js CHANGED
@@ -1,4 +1,8 @@
1
- import { cross3, dot3, normalize, setC, sub3, } from "@thi.ng/vectors";
1
+ import { cross3 } from "@thi.ng/vectors/cross";
2
+ import { dot3 } from "@thi.ng/vectors/dot";
3
+ import { normalize } from "@thi.ng/vectors/normalize";
4
+ import { setC } from "@thi.ng/vectors/setc";
5
+ import { sub3 } from "@thi.ng/vectors/sub";
2
6
  /**
3
7
  * Constructs a 4x4 camera matrix for given `eye` position, look-at
4
8
  * `target` (both in world space) and normalized `up` vector. Creates
package/m22-m23.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { MatOpM } from "./api";
1
+ import type { MatOpM } from "./api.js";
2
2
  /**
3
3
  * Converts 2x2 to 2x3 matrix and writes result to `out`. Creates new
4
4
  * matrix if `out` is `null`.
package/m22-m23.js CHANGED
@@ -1,4 +1,4 @@
1
- import { set4 } from "@thi.ng/vectors";
1
+ import { set4 } from "@thi.ng/vectors/set";
2
2
  /**
3
3
  * Converts 2x2 to 2x3 matrix and writes result to `out`. Creates new
4
4
  * matrix if `out` is `null`.
package/m23-m22.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { MatOpM } from "./api";
1
+ import type { MatOpM } from "./api.js";
2
2
  /**
3
3
  * Converts 2x3 to 2x2 matrix and writes result to `out`. Creates new
4
4
  * matrix if `out` is `null`.
package/m23-m22.js CHANGED
@@ -1,4 +1,4 @@
1
- import { set4 } from "@thi.ng/vectors";
1
+ import { set4 } from "@thi.ng/vectors/set";
2
2
  /**
3
3
  * Converts 2x3 to 2x2 matrix and writes result to `out`. Creates new
4
4
  * matrix if `out` is `null`.
package/m23-m44.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { MatOpM } from "./api";
1
+ import type { MatOpM } from "./api.js";
2
2
  /**
3
3
  * Converts 2x3 to 4x4 matrix and writes result to `out`. Creates new
4
4
  * matrix if `out` is `null`.
package/m23-m44.js CHANGED
@@ -1,4 +1,4 @@
1
- import { setC } from "@thi.ng/vectors";
1
+ import { setC } from "@thi.ng/vectors/setc";
2
2
  /**
3
3
  * Converts 2x3 to 4x4 matrix and writes result to `out`. Creates new
4
4
  * matrix if `out` is `null`.
package/m33-m44.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { MatOpM } from "./api";
1
+ import type { MatOpM } from "./api.js";
2
2
  /**
3
3
  * Converts 3x3 to 4x4 matrix and writes result to `out`. Creates new
4
4
  * matrix if `out` is `null`.
package/m33-m44.js CHANGED
@@ -1,4 +1,4 @@
1
- import { setC } from "@thi.ng/vectors";
1
+ import { setC } from "@thi.ng/vectors/setc";
2
2
  /**
3
3
  * Converts 3x3 to 4x4 matrix and writes result to `out`. Creates new
4
4
  * matrix if `out` is `null`.
package/m44-m33.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { MatOpM } from "./api";
1
+ import type { MatOpM } from "./api.js";
2
2
  /**
3
3
  * Converts 4x4 to 3x3 matrix and writes result to `out`. Creates new
4
4
  * matrix if `out` is `null`.
package/m44-m33.js CHANGED
@@ -1,4 +1,4 @@
1
- import { setS3 } from "@thi.ng/vectors";
1
+ import { setS3 } from "@thi.ng/vectors/sets";
2
2
  /**
3
3
  * Converts 4x4 to 3x3 matrix and writes result to `out`. Creates new
4
4
  * matrix if `out` is `null`.
package/matn.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { Mat } from "./api";
1
+ import type { Mat } from "./api.js";
2
2
  export declare const mat22n: (out: Mat | null, n: number) => import("@thi.ng/vectors").Vec;
3
3
  export declare const mat23n: (out: Mat | null, n: number) => import("@thi.ng/vectors").Vec;
4
4
  export declare const mat33n: (out: Mat | null, n: number) => import("@thi.ng/vectors").Vec;
package/matn.js CHANGED
@@ -1,4 +1,4 @@
1
- import { scale22, scale23, scale33, scale44 } from "./scale";
1
+ import { scale22, scale23, scale33, scale44 } from "./scale.js";
2
2
  export const mat22n = (out, n) => scale22(out, n);
3
3
  export const mat23n = (out, n) => scale23(out, n);
4
4
  export const mat33n = (out, n) => scale33(out, n);
package/matv.js CHANGED
@@ -1,4 +1,4 @@
1
- import { setVV16, setVV4, setVV6, setVV9 } from "@thi.ng/vectors";
1
+ import { setVV16, setVV4, setVV6, setVV9 } from "@thi.ng/vectors/setvv";
2
2
  /**
3
3
  * Initializes 2x2 matrix from 2D column vectors.
4
4
  *
package/mixq.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ReadonlyVec, Vec } from "@thi.ng/vectors";
1
+ import type { ReadonlyVec, Vec } from "@thi.ng/vectors";
2
2
  /**
3
3
  * Interpolates quaternion `a` to `b` by given amount `t` [0...1], using
4
4
  * SLERP. Writes result to `out`. The optional `eps` (default 1e-3) is
@@ -11,5 +11,5 @@ import { ReadonlyVec, Vec } from "@thi.ng/vectors";
11
11
  * @param t -
12
12
  * @param eps -
13
13
  */
14
- export declare const mixQ: (out: Vec | null, a: ReadonlyVec, b: ReadonlyVec, t: number, eps?: number) => Vec | null;
14
+ export declare const mixQ: (out: Vec | null, a: ReadonlyVec, b: ReadonlyVec, t: number, eps?: number) => Vec;
15
15
  //# sourceMappingURL=mixq.d.ts.map
package/mixq.js CHANGED
@@ -1,4 +1,7 @@
1
- import { dot4, maddN4, mulN4, set4 } from "@thi.ng/vectors";
1
+ import { dot4 } from "@thi.ng/vectors/dot";
2
+ import { maddN4 } from "@thi.ng/vectors/maddn";
3
+ import { mulN4 } from "@thi.ng/vectors/muln";
4
+ import { set4 } from "@thi.ng/vectors/set";
2
5
  /**
3
6
  * Interpolates quaternion `a` to `b` by given amount `t` [0...1], using
4
7
  * SLERP. Writes result to `out`. The optional `eps` (default 1e-3) is
package/mul.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { MatOpMM, MultiMatOpMM } from "./api";
1
+ import type { MatOpMM, MultiMatOpMM } from "./api.js";
2
2
  /**
3
3
  * Componentwise matrix multiplication. Use {@link mulM} or
4
4
  * {@link concat} for actual matrix-matrix multiplication/concatenation.
package/mul.js CHANGED
@@ -1,5 +1,5 @@
1
- import { mul as _mul, mul4 } from "@thi.ng/vectors";
2
- import { defMath } from "./internal/codegen";
1
+ import { mul as _mul, mul4 } from "@thi.ng/vectors/mul";
2
+ import { defMath } from "./compile/emit.js";
3
3
  /**
4
4
  * Componentwise matrix multiplication. Use {@link mulM} or
5
5
  * {@link concat} for actual matrix-matrix multiplication/concatenation.
package/mulm.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { MultiMatOpMM } from "./api";
1
+ import type { MultiMatOpMM } from "./api.js";
2
2
  /**
3
3
  * Multi-method. Performs matrix-matrix multiplication. If `out` is not
4
4
  * given, writes result in `a`.
@@ -16,7 +16,7 @@ export declare const mulM: MultiMatOpMM;
16
16
  * @param a -
17
17
  * @param b -
18
18
  */
19
- export declare const mulM22: import("./api").MatOpMM;
19
+ export declare const mulM22: import("./api.js").MatOpMM;
20
20
  /**
21
21
  * 2x3 matrix-matrix multiplication. If `out` is not given, writes
22
22
  * result in `a`.
@@ -25,7 +25,7 @@ export declare const mulM22: import("./api").MatOpMM;
25
25
  * @param a -
26
26
  * @param b -
27
27
  */
28
- export declare const mulM23: import("./api").MatOpMM;
28
+ export declare const mulM23: import("./api.js").MatOpMM;
29
29
  /**
30
30
  * 3x3 matrix-matrix multiplication. If `out` is not given, writes
31
31
  * result in `a`.
@@ -34,7 +34,7 @@ export declare const mulM23: import("./api").MatOpMM;
34
34
  * @param a -
35
35
  * @param b -
36
36
  */
37
- export declare const mulM33: import("./api").MatOpMM;
37
+ export declare const mulM33: import("./api.js").MatOpMM;
38
38
  /**
39
39
  * 4x4 matrix-matrix multiplication. If `out` is not given, writes
40
40
  * result in `a`.
@@ -43,5 +43,5 @@ export declare const mulM33: import("./api").MatOpMM;
43
43
  * @param a -
44
44
  * @param b -
45
45
  */
46
- export declare const mulM44: import("./api").MatOpMM;
46
+ export declare const mulM44: import("./api.js").MatOpMM;
47
47
  //# sourceMappingURL=mulm.d.ts.map
package/mulm.js CHANGED
@@ -1,4 +1,6 @@
1
- import { dotS2, dotS3, dotS4, setC, setC4, setC6, vop } from "@thi.ng/vectors";
1
+ import { dotS2, dotS3, dotS4 } from "@thi.ng/vectors/dots";
2
+ import { setC, setC4, setC6 } from "@thi.ng/vectors/setc";
3
+ import { vop } from "@thi.ng/vectors/vop";
2
4
  /**
3
5
  * Multi-method. Performs matrix-matrix multiplication. If `out` is not
4
6
  * given, writes result in `a`.
package/muln.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { MatOpMN, MultiMatOpMN } from "./api";
1
+ import type { MatOpMN, MultiMatOpMN } from "./api.js";
2
2
  /**
3
3
  * Multiplies matrix componentwise with single scalar. If `out` is not
4
4
  * given, writes result in `mat`.
package/muln.js CHANGED
@@ -1,5 +1,5 @@
1
- import { mulN as _mulN, mulN4 } from "@thi.ng/vectors";
2
- import { defMathN } from "./internal/codegen";
1
+ import { mulN as _mulN, mulN4 } from "@thi.ng/vectors/muln";
2
+ import { defMathN } from "./compile/emit.js";
3
3
  /**
4
4
  * Multiplies matrix componentwise with single scalar. If `out` is not
5
5
  * given, writes result in `mat`.
package/mulq.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { VecOpVV } from "@thi.ng/vectors";
1
+ import type { VecOpVV } from "@thi.ng/vectors";
2
2
  /**
3
3
  * Performs quaternion multiplication of `a` and `b` and writes result
4
4
  * to `out`. If `out` is null, writes result into `a`.
package/mulq.js CHANGED
@@ -1,4 +1,4 @@
1
- import { setC4 } from "@thi.ng/vectors";
1
+ import { setC4 } from "@thi.ng/vectors/setc";
2
2
  /**
3
3
  * Performs quaternion multiplication of `a` and `b` and writes result
4
4
  * to `out`. If `out` is null, writes result into `a`.
package/mulv.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { ReadonlyVec, Vec, VecOpVV } from "@thi.ng/vectors";
2
- import type { MatOpMV, MultiMatOpMV, ReadonlyMat } from "./api";
1
+ import type { ReadonlyVec, Vec, VecOpVV } from "@thi.ng/vectors";
2
+ import type { MatOpMV, MultiMatOpMV, ReadonlyMat } from "./api.js";
3
3
  /**
4
4
  * Matrix-vector multiplication. Supports in-place modification, i.e. if
5
5
  * `out === v`.
package/mulv.js CHANGED
@@ -1,4 +1,6 @@
1
- import { dotS2, dotS3, dotS4, setC2, setC3, setC4, vop, } from "@thi.ng/vectors";
1
+ import { dotS2, dotS3, dotS4 } from "@thi.ng/vectors/dots";
2
+ import { setC2, setC3, setC4 } from "@thi.ng/vectors/setc";
3
+ import { vop } from "@thi.ng/vectors/vop";
2
4
  /**
3
5
  * Matrix-vector multiplication. Supports in-place modification, i.e. if
4
6
  * `out === v`.
package/mulvm.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { ReadonlyVec, Vec } from "@thi.ng/vectors";
2
- import type { ReadonlyMat } from "./api";
1
+ import type { ReadonlyVec, Vec } from "@thi.ng/vectors";
2
+ import type { ReadonlyMat } from "./api.js";
3
3
  /**
4
4
  * Same as:
5
5
  *
package/mulvm.js CHANGED
@@ -1,4 +1,6 @@
1
- import { dot2, dot3, dot4, dotS2, dotS3, dotS4, setC2, setC3, setC4, } from "@thi.ng/vectors";
1
+ import { dot2, dot3, dot4 } from "@thi.ng/vectors/dot";
2
+ import { dotS2, dotS3, dotS4 } from "@thi.ng/vectors/dots";
3
+ import { setC2, setC3, setC4 } from "@thi.ng/vectors/setc";
2
4
  /**
3
5
  * Same as:
4
6
  *
package/normal-mat.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { MatOpMU } from "./api";
1
+ import type { MatOpMU } from "./api.js";
2
2
  /**
3
3
  * Converts given 4x4 matrix to a 3x3 normal matrix, i.e. the transposed
4
4
  * inverse of its upper-left 3x3 region. If `out` is null a new result
package/normal-mat.js CHANGED
@@ -1,6 +1,6 @@
1
- import { invert33, invert44 } from "./invert";
2
- import { mat44to33 } from "./m44-m33";
3
- import { transpose33, transpose44 } from "./transpose";
1
+ import { invert33, invert44 } from "./invert.js";
2
+ import { mat44to33 } from "./m44-m33.js";
3
+ import { transpose33, transpose44 } from "./transpose.js";
4
4
  /**
5
5
  * Converts given 4x4 matrix to a 3x3 normal matrix, i.e. the transposed
6
6
  * inverse of its upper-left 3x3 region. If `out` is null a new result
package/orthagonal.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { ReadonlyMat } from "./api";
1
+ import type { ReadonlyMat } from "./api.js";
2
2
  /**
3
3
  * Returns true, if given square matrix of size `n` is orthagonal, i.e.
4
4
  * check if `A * AT = I`.
package/orthagonal.js CHANGED
@@ -1,4 +1,5 @@
1
- import { EPS, eqDelta } from "@thi.ng/math";
1
+ import { EPS } from "@thi.ng/math/api";
2
+ import { eqDelta } from "@thi.ng/math/eqdelta";
2
3
  /**
3
4
  * Returns true, if given square matrix of size `n` is orthagonal, i.e.
4
5
  * check if `A * AT = I`.
package/ortho.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { Mat } from "./api";
1
+ import type { Mat } from "./api.js";
2
2
  /**
3
3
  * Creates a 4x4 matrix orthographic projection matrix and writes result
4
4
  * to `out`.
package/ortho.js CHANGED
@@ -1,4 +1,4 @@
1
- import { setC } from "@thi.ng/vectors";
1
+ import { setC } from "@thi.ng/vectors/setc";
2
2
  /**
3
3
  * Creates a 4x4 matrix orthographic projection matrix and writes result
4
4
  * to `out`.
@@ -1,4 +1,4 @@
1
- import { MultiVecOpVV } from "@thi.ng/vectors";
1
+ import type { MultiVecOpVV } from "@thi.ng/vectors";
2
2
  /**
3
3
  * Computes outer/tensor product of vectors `u` and `v`. Returns square
4
4
  * matrix of same dimensions as vectors, e.g. 3x3 matrix for 3D vectors.
package/outer-product.js CHANGED
@@ -1,4 +1,5 @@
1
- import { setC, setC4, vop } from "@thi.ng/vectors";
1
+ import { setC, setC4 } from "@thi.ng/vectors/setc";
2
+ import { vop } from "@thi.ng/vectors/vop";
2
3
  /**
3
4
  * Computes outer/tensor product of vectors `u` and `v`. Returns square
4
5
  * matrix of same dimensions as vectors, e.g. 3x3 matrix for 3D vectors.