@lakuna/umath 2.0.0 → 3.0.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.
- package/LICENSE +1 -1
- package/dist/algorithms/greatestCommonDivisor.d.ts.map +1 -1
- package/dist/algorithms/greatestCommonDivisor.js +14 -4
- package/dist/algorithms/greatestCommonDivisor.js.map +1 -1
- package/dist/index.d.ts +11 -11
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/linalg/DualQuaternion.d.ts +124 -124
- package/dist/linalg/DualQuaternion.d.ts.map +1 -1
- package/dist/linalg/DualQuaternion.js +173 -165
- package/dist/linalg/DualQuaternion.js.map +1 -1
- package/dist/linalg/Matrix.d.ts +24 -24
- package/dist/linalg/Matrix.d.ts.map +1 -1
- package/dist/linalg/Matrix2.d.ts +63 -63
- package/dist/linalg/Matrix2.d.ts.map +1 -1
- package/dist/linalg/Matrix2.js +92 -88
- package/dist/linalg/Matrix2.js.map +1 -1
- package/dist/linalg/Matrix3.d.ts +107 -107
- package/dist/linalg/Matrix3.d.ts.map +1 -1
- package/dist/linalg/Matrix3.js +147 -138
- package/dist/linalg/Matrix3.js.map +1 -1
- package/dist/linalg/Matrix4.d.ts +200 -201
- package/dist/linalg/Matrix4.d.ts.map +1 -1
- package/dist/linalg/Matrix4.js +272 -251
- package/dist/linalg/Matrix4.js.map +1 -1
- package/dist/linalg/Quaternion.d.ts +116 -116
- package/dist/linalg/Quaternion.d.ts.map +1 -1
- package/dist/linalg/Quaternion.js +175 -161
- package/dist/linalg/Quaternion.js.map +1 -1
- package/dist/linalg/SlowMatrix.d.ts +5 -5
- package/dist/linalg/SlowMatrix.d.ts.map +1 -1
- package/dist/linalg/SlowMatrix.js +12 -12
- package/dist/linalg/SlowMatrix.js.map +1 -1
- package/dist/linalg/SlowSquareMatrix.d.ts +6 -6
- package/dist/linalg/SlowSquareMatrix.d.ts.map +1 -1
- package/dist/linalg/SlowSquareMatrix.js +15 -15
- package/dist/linalg/SlowSquareMatrix.js.map +1 -1
- package/dist/linalg/SlowVector.d.ts +70 -70
- package/dist/linalg/SlowVector.d.ts.map +1 -1
- package/dist/linalg/SlowVector.js +153 -153
- package/dist/linalg/SlowVector.js.map +1 -1
- package/dist/linalg/SquareMatrix.d.ts +8 -8
- package/dist/linalg/SquareMatrix.d.ts.map +1 -1
- package/dist/linalg/Vector.d.ts +85 -84
- package/dist/linalg/Vector.d.ts.map +1 -1
- package/dist/linalg/Vector2.d.ts +104 -104
- package/dist/linalg/Vector2.d.ts.map +1 -1
- package/dist/linalg/Vector2.js +145 -143
- package/dist/linalg/Vector2.js.map +1 -1
- package/dist/linalg/Vector3.d.ts +130 -130
- package/dist/linalg/Vector3.d.ts.map +1 -1
- package/dist/linalg/Vector3.js +176 -173
- package/dist/linalg/Vector3.js.map +1 -1
- package/dist/linalg/Vector4.d.ts +101 -101
- package/dist/linalg/Vector4.d.ts.map +1 -1
- package/dist/linalg/Vector4.js +144 -140
- package/dist/linalg/Vector4.js.map +1 -1
- package/dist/types/AxisAngle.d.ts +2 -2
- package/dist/types/AxisAngle.d.ts.map +1 -1
- package/dist/types/FieldOfView.d.ts +2 -2
- package/dist/types/FieldOfView.d.ts.map +1 -1
- package/dist/utility/BigNumber.d.ts +21 -11
- package/dist/utility/BigNumber.d.ts.map +1 -1
- package/dist/utility/BigNumber.js +42 -31
- package/dist/utility/BigNumber.js.map +1 -1
- package/dist/utility/createAxisAngleLike.d.ts.map +1 -1
- package/dist/utility/createAxisAngleLike.js.map +1 -1
- package/package.json +11 -9
- package/src/algorithms/greatestCommonDivisor.ts +19 -7
- package/src/index.ts +17 -13
- package/src/linalg/DualQuaternion.ts +208 -193
- package/src/linalg/Matrix.ts +28 -28
- package/src/linalg/Matrix2.ts +117 -108
- package/src/linalg/Matrix3.ts +177 -158
- package/src/linalg/Matrix4.ts +386 -348
- package/src/linalg/Quaternion.ts +207 -189
- package/src/linalg/SlowMatrix.ts +19 -18
- package/src/linalg/SlowSquareMatrix.ts +19 -18
- package/src/linalg/SlowVector.ts +170 -169
- package/src/linalg/SquareMatrix.ts +9 -9
- package/src/linalg/Vector.ts +91 -89
- package/src/linalg/Vector2.ts +160 -155
- package/src/linalg/Vector3.ts +206 -199
- package/src/linalg/Vector4.ts +165 -156
- package/src/types/AxisAngle.ts +3 -3
- package/src/types/FieldOfView.ts +3 -3
- package/src/utility/BigNumber.ts +63 -41
- package/src/utility/createAxisAngleLike.ts +1 -0
|
@@ -4,6 +4,10 @@ import greatestCommonDivisor from "../algorithms/greatestCommonDivisor.js";
|
|
|
4
4
|
* @public
|
|
5
5
|
*/
|
|
6
6
|
export default class BigNumber {
|
|
7
|
+
/** The dividend of this fraction. */
|
|
8
|
+
dividend;
|
|
9
|
+
/** The divisor of this fraction. */
|
|
10
|
+
divisor;
|
|
7
11
|
/**
|
|
8
12
|
* Create a number.
|
|
9
13
|
* @param dividend - The dividend of the number.
|
|
@@ -13,31 +17,21 @@ export default class BigNumber {
|
|
|
13
17
|
if (divisor === 0) {
|
|
14
18
|
throw new Error("Cannot divide by zero.");
|
|
15
19
|
}
|
|
20
|
+
if (dividend instanceof BigNumber) {
|
|
21
|
+
this.dividend = dividend.dividend;
|
|
22
|
+
this.divisor = dividend.divisor;
|
|
23
|
+
this.divide(divisor);
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
16
26
|
this.dividend = BigInt(dividend);
|
|
27
|
+
if (divisor instanceof BigNumber) {
|
|
28
|
+
this.divisor = 1n;
|
|
29
|
+
this.divide(divisor);
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
17
32
|
this.divisor = BigInt(divisor);
|
|
18
33
|
this.simplify();
|
|
19
34
|
}
|
|
20
|
-
/** The dividend of this fraction. */
|
|
21
|
-
dividend;
|
|
22
|
-
/** The divisor of this fraction. */
|
|
23
|
-
divisor;
|
|
24
|
-
/**
|
|
25
|
-
* Simplify this fraction.
|
|
26
|
-
* @internal
|
|
27
|
-
*/
|
|
28
|
-
simplify() {
|
|
29
|
-
// Switch signs such that only the dividend can be negative.
|
|
30
|
-
if (this.divisor < 0) {
|
|
31
|
-
this.dividend = -this.dividend;
|
|
32
|
-
this.divisor = -this.divisor;
|
|
33
|
-
}
|
|
34
|
-
// Divide both by their greatest common divisor.
|
|
35
|
-
const gcd = greatestCommonDivisor(this.dividend, this.divisor);
|
|
36
|
-
if (gcd > 1) {
|
|
37
|
-
this.dividend /= gcd;
|
|
38
|
-
this.divisor /= gcd;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
35
|
/**
|
|
42
36
|
* Add a number to this number.
|
|
43
37
|
* @param n - The other number.
|
|
@@ -55,17 +49,17 @@ export default class BigNumber {
|
|
|
55
49
|
return this;
|
|
56
50
|
}
|
|
57
51
|
/**
|
|
58
|
-
*
|
|
52
|
+
* Divide this number by a number.
|
|
59
53
|
* @param n - The other number.
|
|
60
54
|
* @returns This number.
|
|
61
55
|
*/
|
|
62
|
-
|
|
56
|
+
divide(n) {
|
|
63
57
|
if (n instanceof BigNumber) {
|
|
64
|
-
this.dividend
|
|
65
|
-
this.divisor *= n.
|
|
58
|
+
this.dividend *= n.divisor;
|
|
59
|
+
this.divisor *= n.dividend;
|
|
66
60
|
}
|
|
67
61
|
else {
|
|
68
|
-
this.
|
|
62
|
+
this.divisor *= BigInt(n);
|
|
69
63
|
}
|
|
70
64
|
this.simplify();
|
|
71
65
|
return this;
|
|
@@ -87,17 +81,17 @@ export default class BigNumber {
|
|
|
87
81
|
return this;
|
|
88
82
|
}
|
|
89
83
|
/**
|
|
90
|
-
*
|
|
84
|
+
* Subtract a number from this number.
|
|
91
85
|
* @param n - The other number.
|
|
92
86
|
* @returns This number.
|
|
93
87
|
*/
|
|
94
|
-
|
|
88
|
+
subtract(n) {
|
|
95
89
|
if (n instanceof BigNumber) {
|
|
96
|
-
this.dividend
|
|
97
|
-
this.divisor *= n.
|
|
90
|
+
this.dividend = this.dividend * n.divisor - n.dividend * this.divisor;
|
|
91
|
+
this.divisor *= n.divisor;
|
|
98
92
|
}
|
|
99
93
|
else {
|
|
100
|
-
this.
|
|
94
|
+
this.dividend -= BigInt(n) * this.divisor;
|
|
101
95
|
}
|
|
102
96
|
this.simplify();
|
|
103
97
|
return this;
|
|
@@ -117,5 +111,22 @@ export default class BigNumber {
|
|
|
117
111
|
toString() {
|
|
118
112
|
return `${this.dividend.toLocaleString()}/${this.divisor.toLocaleString()}`;
|
|
119
113
|
}
|
|
114
|
+
/**
|
|
115
|
+
* Simplify this fraction.
|
|
116
|
+
* @internal
|
|
117
|
+
*/
|
|
118
|
+
simplify() {
|
|
119
|
+
// Switch signs such that only the dividend can be negative.
|
|
120
|
+
if (this.divisor < 0) {
|
|
121
|
+
this.dividend = -this.dividend;
|
|
122
|
+
this.divisor = -this.divisor;
|
|
123
|
+
}
|
|
124
|
+
// Divide both by their greatest common divisor.
|
|
125
|
+
const gcd = greatestCommonDivisor(this.dividend, this.divisor);
|
|
126
|
+
if (gcd > 1) {
|
|
127
|
+
this.dividend /= gcd;
|
|
128
|
+
this.divisor /= gcd;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
120
131
|
}
|
|
121
132
|
//# sourceMappingURL=BigNumber.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BigNumber.js","sourceRoot":"","sources":["../../src/utility/BigNumber.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,MAAM,wCAAwC,CAAC;
|
|
1
|
+
{"version":3,"file":"BigNumber.js","sourceRoot":"","sources":["../../src/utility/BigNumber.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,MAAM,wCAAwC,CAAC;AAc3E;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,SAAS;IAC7B,qCAAqC;IAC9B,QAAQ,CAAS;IAExB,oCAAoC;IAC7B,OAAO,CAAS;IAEvB;;;;OAIG;IACH,YAAmB,WAA0B,CAAC,EAAE,UAAyB,CAAC;QACzE,IAAI,OAAO,KAAK,CAAC,EAAE,CAAC;YAC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,OAAO,CAAC,CAC3D,CAAC;IACH,CAAC;IAED;;;OAGG;IACI,QAAQ;QACd,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,cAAc,EAAE,IAAI,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC;IAC7E,CAAC;IAED;;;OAGG;IACK,QAAQ;QACf,4DAA4D;QAC5D,IAAI,IAAI,CAAC,OAAO,GAAG,CAAC,EAAE,CAAC;YACtB,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;YAC/B,IAAI,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC;QAC9B,CAAC;QAED,gDAAgD;QAChD,MAAM,GAAG,GAAG,qBAAqB,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QAC/D,IAAI,GAAG,GAAG,CAAC,EAAE,CAAC;YACb,IAAI,CAAC,QAAQ,IAAI,GAAG,CAAC;YACrB,IAAI,CAAC,OAAO,IAAI,GAAG,CAAC;QACrB,CAAC;IACF,CAAC;CACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createAxisAngleLike.d.ts","sourceRoot":"","sources":["../../src/utility/createAxisAngleLike.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"createAxisAngleLike.d.ts","sourceRoot":"","sources":["../../src/utility/createAxisAngleLike.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,uBAAuB,CAAC;AAInD;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,mBAAmB,IAAI,SAAS,GAAG;IAC1D,IAAI,EAAE,YAAY,CAAC;CACnB,CAEA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createAxisAngleLike.js","sourceRoot":"","sources":["../../src/utility/createAxisAngleLike.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createAxisAngleLike.js","sourceRoot":"","sources":["../../src/utility/createAxisAngleLike.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,mBAAmB;IAG1C,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,EAAE,CAAC;AAChD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lakuna/umath",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "A lightweight math library.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"math"
|
|
@@ -36,18 +36,20 @@
|
|
|
36
36
|
"beautify": "prettier . --write"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@eslint/js": "^
|
|
39
|
+
"@eslint/js": "^10.0.1",
|
|
40
40
|
"@types/eslint": "^9.6.1",
|
|
41
41
|
"@types/eslint-config-prettier": "^6.11.3",
|
|
42
|
-
"@types/node": "^25.0
|
|
43
|
-
"eslint": "^
|
|
42
|
+
"@types/node": "^25.5.0",
|
|
43
|
+
"eslint": "^10.0.3",
|
|
44
44
|
"eslint-config-prettier": "^10.1.8",
|
|
45
|
-
"eslint-plugin-
|
|
46
|
-
"eslint-plugin-
|
|
47
|
-
"
|
|
48
|
-
"
|
|
45
|
+
"eslint-plugin-perfectionist": "^5.7.0",
|
|
46
|
+
"eslint-plugin-prettier": "^5.5.5",
|
|
47
|
+
"eslint-plugin-tsdoc": "^0.5.2",
|
|
48
|
+
"globals": "^17.4.0",
|
|
49
|
+
"prettier": "^3.8.1",
|
|
50
|
+
"typedoc": "^0.28.17",
|
|
49
51
|
"typescript": "^5.9.3",
|
|
50
|
-
"typescript-eslint": "^8.
|
|
52
|
+
"typescript-eslint": "^8.57.1"
|
|
51
53
|
},
|
|
52
54
|
"exports": {
|
|
53
55
|
".": "./dist/index.js",
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
* @public
|
|
8
8
|
*/
|
|
9
9
|
export default function greatestCommonDivisor(a: bigint, b: bigint): bigint;
|
|
10
|
-
|
|
11
10
|
/**
|
|
12
11
|
* Determine the greatest common divisor of two integers.
|
|
13
12
|
* @param a - The first integer.
|
|
@@ -17,21 +16,34 @@ export default function greatestCommonDivisor(a: bigint, b: bigint): bigint;
|
|
|
17
16
|
* @public
|
|
18
17
|
*/
|
|
19
18
|
export default function greatestCommonDivisor(a: number, b: number): number;
|
|
20
|
-
|
|
21
19
|
export default function greatestCommonDivisor(
|
|
22
20
|
a: bigint | number,
|
|
23
21
|
b: bigint | number
|
|
24
|
-
) {
|
|
22
|
+
): bigint | number {
|
|
23
|
+
if (typeof a === "number" && typeof b === "number") {
|
|
24
|
+
// Ensure that both of the integers are positive.
|
|
25
|
+
let c = Math.abs(a);
|
|
26
|
+
let d = Math.abs(b);
|
|
27
|
+
|
|
28
|
+
// Apply the Euclidean algorithm.
|
|
29
|
+
while (d) {
|
|
30
|
+
[c, d] = [d, c % d];
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return c;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
if (typeof a === "number" || typeof b === "number") {
|
|
37
|
+
throw new Error("Mismatched argument types.");
|
|
38
|
+
}
|
|
39
|
+
|
|
25
40
|
// Ensure that both of the integers are positive. Can't use `Math.abs` in case `a` and `b` are `bigint`s.
|
|
26
41
|
let c = a < 0 ? -a : a;
|
|
27
42
|
let d = b < 0 ? -b : b;
|
|
28
43
|
|
|
29
44
|
// Apply the Euclidean algorithm.
|
|
30
45
|
while (d) {
|
|
31
|
-
|
|
32
|
-
const temp = c;
|
|
33
|
-
c = d;
|
|
34
|
-
d = (temp as number) % (d as number);
|
|
46
|
+
[c, d] = [d, c % d];
|
|
35
47
|
}
|
|
36
48
|
|
|
37
49
|
return c;
|
package/src/index.ts
CHANGED
|
@@ -19,32 +19,36 @@ export { default as summation } from "./algorithms/summation.js";
|
|
|
19
19
|
|
|
20
20
|
// Linear Algebra
|
|
21
21
|
export {
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
default as DualQuaternion,
|
|
23
|
+
type DualQuaternionLike
|
|
24
24
|
} from "./linalg/DualQuaternion.js";
|
|
25
|
-
export
|
|
26
|
-
export {
|
|
27
|
-
export {
|
|
28
|
-
export
|
|
25
|
+
export { default as Matrix2, type Matrix2Like } from "./linalg/Matrix2.js";
|
|
26
|
+
export { default as Matrix3, type Matrix3Like } from "./linalg/Matrix3.js";
|
|
27
|
+
export { default as Matrix4, type Matrix4Like } from "./linalg/Matrix4.js";
|
|
28
|
+
export type { default as Matrix, MatrixLike } from "./linalg/Matrix.js";
|
|
29
29
|
export {
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
default as Quaternion,
|
|
31
|
+
type QuaternionLike
|
|
32
32
|
} from "./linalg/Quaternion.js";
|
|
33
33
|
export { default as SlowMatrix } from "./linalg/SlowMatrix.js";
|
|
34
34
|
export { default as SlowSquareMatrix } from "./linalg/SlowSquareMatrix.js";
|
|
35
35
|
export { default as SlowVector } from "./linalg/SlowVector.js";
|
|
36
36
|
export type { default as SquareMatrix } from "./linalg/SquareMatrix.js";
|
|
37
|
-
export
|
|
38
|
-
export {
|
|
39
|
-
export {
|
|
40
|
-
export
|
|
37
|
+
export { default as Vector2, type Vector2Like } from "./linalg/Vector2.js";
|
|
38
|
+
export { default as Vector3, type Vector3Like } from "./linalg/Vector3.js";
|
|
39
|
+
export { default as Vector4, type Vector4Like } from "./linalg/Vector4.js";
|
|
40
|
+
export type { default as Vector, VectorLike } from "./linalg/Vector.js";
|
|
41
41
|
|
|
42
42
|
// Types
|
|
43
43
|
export type { default as AxisAngle } from "./types/AxisAngle.js";
|
|
44
44
|
export type { default as FieldOfView } from "./types/FieldOfView.js";
|
|
45
45
|
|
|
46
46
|
// Utility
|
|
47
|
-
export {
|
|
47
|
+
export {
|
|
48
|
+
type BigIntLike,
|
|
49
|
+
default as BigNumber,
|
|
50
|
+
type BigNumberLike
|
|
51
|
+
} from "./utility/BigNumber.js";
|
|
48
52
|
export { default as createAxisAngleLike } from "./utility/createAxisAngleLike.js";
|
|
49
53
|
export { default as epsilon } from "./utility/epsilon.js";
|
|
50
54
|
export { default as MagnitudeError } from "./utility/MagnitudeError.js";
|