@thi.ng/matrices 2.1.35 → 2.1.37

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.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2022-11-30T22:27:38Z
3
+ - **Last updated**: 2022-12-20T16:33:11Z
4
4
  - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
5
5
 
6
6
  All notable changes to this project will be documented in this file.
package/README.md CHANGED
@@ -1,10 +1,10 @@
1
1
  <!-- This file is generated - DO NOT EDIT! -->
2
2
 
3
- # ![matrices](https://media.thi.ng/umbrella/banners-20220914/thing-matrices.svg?4a7b1186)
3
+ # ![@thi.ng/matrices](https://media.thi.ng/umbrella/banners-20220914/thing-matrices.svg?4a7b1186)
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/@thi.ng/matrices.svg)](https://www.npmjs.com/package/@thi.ng/matrices)
6
6
  ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/matrices.svg)
7
- [![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella)
7
+ [![Mastodon Follow](https://img.shields.io/mastodon/follow/109331703950160316?domain=https%3A%2F%2Fmastodon.thi.ng&style=social)](https://mastodon.thi.ng/@toxi)
8
8
 
9
9
  This project is part of the
10
10
  [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo.
@@ -34,7 +34,7 @@ This project is part of the
34
34
 
35
35
  ## About
36
36
 
37
- Matrix & quaternion operations for 2D/3D geometry processing.
37
+ Matrix & quaternion operations for 2D/3D geometry processing
38
38
 
39
39
  This package provides 160+ matrix & quaternion operations for 2D/3D
40
40
  geometry processing and acts as companion package for
@@ -77,11 +77,8 @@ ES module import:
77
77
 
78
78
  For Node.js REPL:
79
79
 
80
- ```text
81
- # with flag only for < v16
82
- node --experimental-repl-await
83
-
84
- > const matrices = await import("@thi.ng/matrices");
80
+ ```js
81
+ const matrices = await import("@thi.ng/matrices");
85
82
  ```
86
83
 
87
84
  Package sizes (brotli'd, pre-treeshake): ESM: 5.02 KB
@@ -221,7 +218,7 @@ A selection:
221
218
 
222
219
  ## Authors
223
220
 
224
- Karsten Schmidt
221
+ - [Karsten Schmidt](https://thi.ng)
225
222
 
226
223
  If this project contributes to an academic publication, please cite it as:
227
224
 
@@ -236,4 +233,4 @@ If this project contributes to an academic publication, please cite it as:
236
233
 
237
234
  ## License
238
235
 
239
- &copy; 2018 - 2022 Karsten Schmidt // Apache Software License 2.0
236
+ &copy; 2018 - 2022 Karsten Schmidt // Apache License 2.0
package/api.d.ts CHANGED
@@ -1,24 +1,24 @@
1
1
  import type { Tuple, TypedArray } from "@thi.ng/api";
2
2
  import type { IVector, MultiVecOp, ReadonlyVec, Vec } from "@thi.ng/vectors";
3
- export declare type Mat = Vec;
4
- export declare type ReadonlyMat = ReadonlyVec;
5
- export declare type Mat22Like = Tuple<number, 4> | TypedArray;
6
- export declare type Mat23Like = Tuple<number, 6> | TypedArray;
7
- export declare type Mat33Like = Tuple<number, 9> | TypedArray;
8
- export declare type Mat44Like = Tuple<number, 16> | TypedArray;
9
- export declare type IMatrix<T> = IVector<T>;
10
- export declare type MultiMatOp<T> = MultiVecOp<T>;
11
- export declare type MatOp1 = (out: Mat | null) => Mat;
12
- export declare type MatOpM = (out: Mat | null, a: ReadonlyMat) => Mat;
13
- export declare type MatOpV = (out: Mat | null, a: ReadonlyVec) => Mat;
14
- export declare type MatOpMU = (out: Mat | null, a: ReadonlyMat) => Mat | undefined;
15
- export declare type MatOpN = (out: Mat | null, n: number) => Mat;
16
- export declare type MatOpNV = (out: Mat | null, n: number | ReadonlyVec) => Mat;
17
- export declare type MatOpMM = (out: Mat | null, a: ReadonlyMat, b: ReadonlyMat) => Mat;
18
- export declare type MatOpMV = (out: Vec | null, a: ReadonlyMat, b: ReadonlyVec) => Vec;
19
- export declare type MatOpMN = (out: Mat | null, a: ReadonlyMat, n: number) => Mat;
20
- export declare type VecOpM = (out: Vec | null, a: ReadonlyMat) => Vec;
21
- export declare type VecOpMN = (out: Vec | null, a: ReadonlyMat, n: number) => Vec;
3
+ export type Mat = Vec;
4
+ export type ReadonlyMat = ReadonlyVec;
5
+ export type Mat22Like = Tuple<number, 4> | TypedArray;
6
+ export type Mat23Like = Tuple<number, 6> | TypedArray;
7
+ export type Mat33Like = Tuple<number, 9> | TypedArray;
8
+ export type Mat44Like = Tuple<number, 16> | TypedArray;
9
+ export type IMatrix<T> = IVector<T>;
10
+ export type MultiMatOp<T> = MultiVecOp<T>;
11
+ export type MatOp1 = (out: Mat | null) => Mat;
12
+ export type MatOpM = (out: Mat | null, a: ReadonlyMat) => Mat;
13
+ export type MatOpV = (out: Mat | null, a: ReadonlyVec) => Mat;
14
+ export type MatOpMU = (out: Mat | null, a: ReadonlyMat) => Mat | undefined;
15
+ export type MatOpN = (out: Mat | null, n: number) => Mat;
16
+ export type MatOpNV = (out: Mat | null, n: number | ReadonlyVec) => Mat;
17
+ export type MatOpMM = (out: Mat | null, a: ReadonlyMat, b: ReadonlyMat) => Mat;
18
+ export type MatOpMV = (out: Vec | null, a: ReadonlyMat, b: ReadonlyVec) => Vec;
19
+ export type MatOpMN = (out: Mat | null, a: ReadonlyMat, n: number) => Mat;
20
+ export type VecOpM = (out: Vec | null, a: ReadonlyMat) => Vec;
21
+ export type VecOpMN = (out: Vec | null, a: ReadonlyMat, n: number) => Vec;
22
22
  export interface MultiMatOp1 extends MatOp1, MultiMatOp<MatOp1> {
23
23
  }
24
24
  export interface MultiMatOpM extends MatOpM, MultiMatOp<MatOpM> {
package/orthagonal.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import type { ReadonlyMat } from "./api.js";
2
2
  /**
3
- * Returns true, if given square matrix of size `n` is orthagonal, i.e.
4
- * check if `A * AT = I`.
3
+ * Returns true, if given square matrix of size `n` is orthagonal, i.e. check if
4
+ * `A * AT = I`.
5
5
  *
6
- * {@link https://en.wikipedia.org/wiki/Orthogonal_matrix}
6
+ * https://en.wikipedia.org/wiki/Orthogonal_matrix
7
7
  *
8
8
  * @param m -
9
9
  * @param n -
package/orthagonal.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { EPS } from "@thi.ng/math/api";
2
2
  import { eqDelta } from "@thi.ng/math/eqdelta";
3
3
  /**
4
- * Returns true, if given square matrix of size `n` is orthagonal, i.e.
5
- * check if `A * AT = I`.
4
+ * Returns true, if given square matrix of size `n` is orthagonal, i.e. check if
5
+ * `A * AT = I`.
6
6
  *
7
- * {@link https://en.wikipedia.org/wiki/Orthogonal_matrix}
7
+ * https://en.wikipedia.org/wiki/Orthogonal_matrix
8
8
  *
9
9
  * @param m -
10
10
  * @param n -
@@ -1,9 +1,9 @@
1
1
  import type { MultiVecOpVV } from "@thi.ng/vectors";
2
2
  /**
3
- * Computes outer/tensor product of vectors `u` and `v`. Returns square
4
- * matrix of same dimensions as vectors, e.g. 3x3 matrix for 3D vectors.
3
+ * Computes outer/tensor product of vectors `u` and `v`. Returns square matrix
4
+ * of same dimensions as vectors, e.g. 3x3 matrix for 3D vectors.
5
5
  *
6
- * {@link https://en.wikipedia.org/wiki/Outer_product}
6
+ * https://en.wikipedia.org/wiki/Outer_product
7
7
  */
8
8
  export declare const outerProduct: MultiVecOpVV;
9
9
  export declare const outerProduct2: import("@thi.ng/vectors").VecOpVV;
package/outer-product.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { setC, setC4 } from "@thi.ng/vectors/setc";
2
2
  import { vop } from "@thi.ng/vectors/vop";
3
3
  /**
4
- * Computes outer/tensor product of vectors `u` and `v`. Returns square
5
- * matrix of same dimensions as vectors, e.g. 3x3 matrix for 3D vectors.
4
+ * Computes outer/tensor product of vectors `u` and `v`. Returns square matrix
5
+ * of same dimensions as vectors, e.g. 3x3 matrix for 3D vectors.
6
6
  *
7
- * {@link https://en.wikipedia.org/wiki/Outer_product}
7
+ * https://en.wikipedia.org/wiki/Outer_product
8
8
  */
9
9
  export const outerProduct = vop(1);
10
10
  export const outerProduct2 = outerProduct.add(2, (out, [ux, uy], [vx, vy]) => setC4(out || [], ux * vx, uy * vx, ux * vy, uy * vy));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/matrices",
3
- "version": "2.1.35",
3
+ "version": "2.1.37",
4
4
  "description": "Matrix & quaternion operations for 2D/3D geometry processing",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -21,7 +21,7 @@
21
21
  "url": "https://patreon.com/thing_umbrella"
22
22
  }
23
23
  ],
24
- "author": "Karsten Schmidt <k+npm@thi.ng>",
24
+ "author": "Karsten Schmidt (https://thi.ng)",
25
25
  "license": "Apache-2.0",
26
26
  "scripts": {
27
27
  "build": "yarn clean && tsc --declaration",
@@ -34,18 +34,18 @@
34
34
  "test": "testament test"
35
35
  },
36
36
  "dependencies": {
37
- "@thi.ng/api": "^8.5.1",
38
- "@thi.ng/checks": "^3.3.4",
39
- "@thi.ng/math": "^5.3.15",
40
- "@thi.ng/vectors": "^7.5.26"
37
+ "@thi.ng/api": "^8.6.1",
38
+ "@thi.ng/checks": "^3.3.5",
39
+ "@thi.ng/math": "^5.3.17",
40
+ "@thi.ng/vectors": "^7.5.28"
41
41
  },
42
42
  "devDependencies": {
43
- "@microsoft/api-extractor": "^7.33.5",
44
- "@thi.ng/testament": "^0.3.6",
43
+ "@microsoft/api-extractor": "^7.33.7",
44
+ "@thi.ng/testament": "^0.3.7",
45
45
  "rimraf": "^3.0.2",
46
46
  "tools": "^0.0.1",
47
- "typedoc": "^0.23.20",
48
- "typescript": "^4.8.4"
47
+ "typedoc": "^0.23.22",
48
+ "typescript": "^4.9.4"
49
49
  },
50
50
  "keywords": [
51
51
  "2d",
@@ -269,5 +269,5 @@
269
269
  ],
270
270
  "year": 2018
271
271
  },
272
- "gitHead": "1fe40da507070653f420156d91e6b27cf682004f\n"
272
+ "gitHead": "7b2af448da8a63fb21704a79cc4cdf1f3d7d7a64\n"
273
273
  }