pimath 0.1.8 → 0.1.10
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/dist/index.js +47 -0
- package/dist/index.js.map +1 -0
- package/package.json +13 -13
- package/types/index.d.ts +36 -36
- package/types/index.d.ts.map +1 -1
- package/dist/pimath.js +0 -4160
- package/types/algebra/equation.d.ts +0 -102
- package/types/algebra/equation.d.ts.map +0 -1
- package/types/algebra/equationSolver.d.ts +0 -10
- package/types/algebra/equationSolver.d.ts.map +0 -1
- package/types/algebra/factor.d.ts +0 -46
- package/types/algebra/factor.d.ts.map +0 -1
- package/types/algebra/linearSystem.d.ts +0 -37
- package/types/algebra/linearSystem.d.ts.map +0 -1
- package/types/algebra/logicalset.d.ts +0 -25
- package/types/algebra/logicalset.d.ts.map +0 -1
- package/types/algebra/monom.d.ts +0 -169
- package/types/algebra/monom.d.ts.map +0 -1
- package/types/algebra/polyFactor.d.ts +0 -44
- package/types/algebra/polyFactor.d.ts.map +0 -1
- package/types/algebra/polynom.d.ts +0 -107
- package/types/algebra/polynom.d.ts.map +0 -1
- package/types/algebra/rational.d.ts +0 -41
- package/types/algebra/rational.d.ts.map +0 -1
- package/types/coefficients/fraction.d.ts +0 -92
- package/types/coefficients/fraction.d.ts.map +0 -1
- package/types/coefficients/nthRoot.d.ts +0 -20
- package/types/coefficients/nthRoot.d.ts.map +0 -1
- package/types/geometry/circle.d.ts +0 -39
- package/types/geometry/circle.d.ts.map +0 -1
- package/types/geometry/geomMath.d.ts +0 -9
- package/types/geometry/geomMath.d.ts.map +0 -1
- package/types/geometry/line.d.ts +0 -91
- package/types/geometry/line.d.ts.map +0 -1
- package/types/geometry/line3.d.ts +0 -58
- package/types/geometry/line3.d.ts.map +0 -1
- package/types/geometry/matrix.d.ts +0 -12
- package/types/geometry/matrix.d.ts.map +0 -1
- package/types/geometry/plane3.d.ts +0 -36
- package/types/geometry/plane3.d.ts.map +0 -1
- package/types/geometry/point.d.ts +0 -12
- package/types/geometry/point.d.ts.map +0 -1
- package/types/geometry/triangle.d.ts +0 -69
- package/types/geometry/triangle.d.ts.map +0 -1
- package/types/geometry/vector.d.ts +0 -56
- package/types/geometry/vector.d.ts.map +0 -1
- package/types/geometry/vector3d.d.ts +0 -37
- package/types/geometry/vector3d.d.ts.map +0 -1
- package/types/helpers.d.ts +0 -3
- package/types/helpers.d.ts.map +0 -1
- package/types/numeric.d.ts +0 -39
- package/types/numeric.d.ts.map +0 -1
- package/types/pimath.interface.d.ts +0 -57
- package/types/pimath.interface.d.ts.map +0 -1
- package/types/randomization/algebra/rndEquation.d.ts +0 -4
- package/types/randomization/algebra/rndEquation.d.ts.map +0 -1
- package/types/randomization/algebra/rndMonom.d.ts +0 -4
- package/types/randomization/algebra/rndMonom.d.ts.map +0 -1
- package/types/randomization/algebra/rndPolynom.d.ts +0 -5
- package/types/randomization/algebra/rndPolynom.d.ts.map +0 -1
- package/types/randomization/coefficient/rndFraction.d.ts +0 -4
- package/types/randomization/coefficient/rndFraction.d.ts.map +0 -1
- package/types/randomization/geometry/rndCircle.d.ts +0 -4
- package/types/randomization/geometry/rndCircle.d.ts.map +0 -1
- package/types/randomization/geometry/rndLine.d.ts +0 -4
- package/types/randomization/geometry/rndLine.d.ts.map +0 -1
- package/types/randomization/geometry/rndLine3.d.ts +0 -4
- package/types/randomization/geometry/rndLine3.d.ts.map +0 -1
- package/types/randomization/geometry/rndPoint.d.ts +0 -4
- package/types/randomization/geometry/rndPoint.d.ts.map +0 -1
- package/types/randomization/random.d.ts +0 -20
- package/types/randomization/random.d.ts.map +0 -1
- package/types/randomization/rndHelpers.d.ts +0 -21
- package/types/randomization/rndTypes.d.ts +0 -64
- package/types/randomization/rndTypes.d.ts.map +0 -1
package/dist/index.js
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Fraction } from "./coefficients/fraction";
|
|
2
|
+
import { NthRoot } from "./coefficients/nthRoot";
|
|
3
|
+
import { Monom } from "./algebra/monom";
|
|
4
|
+
import { Polynom } from "./algebra/polynom";
|
|
5
|
+
import { Factor } from "./algebra/factor";
|
|
6
|
+
import { PolyFactor } from "./algebra/polyFactor";
|
|
7
|
+
import { Equation } from "./algebra/equation";
|
|
8
|
+
import { LinearSystem } from "./algebra/linearSystem";
|
|
9
|
+
import { Circle } from "./geometry/circle";
|
|
10
|
+
import { Line } from "./geometry/line";
|
|
11
|
+
import { Point } from "./geometry/point";
|
|
12
|
+
import { Triangle } from "./geometry/triangle";
|
|
13
|
+
import { Vector } from "./geometry/vector";
|
|
14
|
+
import { Line3 } from "./geometry/line3";
|
|
15
|
+
import { Plane3 } from "./geometry/plane3";
|
|
16
|
+
import { Matrix } from "./geometry/matrix";
|
|
17
|
+
import { Numeric } from "./numeric";
|
|
18
|
+
import { Random } from "./randomization/random";
|
|
19
|
+
import { NumExp } from "piexpression";
|
|
20
|
+
import { LogicalSet } from "./algebra/logicalset";
|
|
21
|
+
const Geometry = {
|
|
22
|
+
Vector: Vector,
|
|
23
|
+
Point: Point,
|
|
24
|
+
Line: Line,
|
|
25
|
+
Triangle: Triangle,
|
|
26
|
+
Circle: Circle,
|
|
27
|
+
Line3: Line3,
|
|
28
|
+
Plane3: Plane3,
|
|
29
|
+
};
|
|
30
|
+
const PiMath = {
|
|
31
|
+
Numeric,
|
|
32
|
+
Fraction,
|
|
33
|
+
Root: NthRoot,
|
|
34
|
+
Monom,
|
|
35
|
+
Polynom,
|
|
36
|
+
Equation,
|
|
37
|
+
Matrix,
|
|
38
|
+
LinearSystem,
|
|
39
|
+
Factor,
|
|
40
|
+
PolyFactor,
|
|
41
|
+
LogicalSet,
|
|
42
|
+
Random,
|
|
43
|
+
Geometry,
|
|
44
|
+
NumExp
|
|
45
|
+
};
|
|
46
|
+
export default PiMath;
|
|
47
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAC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MAAM,GAAG;IACX,OAAO;IACP,QAAQ;IACR,IAAI,EAAE,OAAO;IACb,KAAK;IACL,OAAO;IACP,QAAQ;IACR,MAAM;IACN,YAAY;IACZ,MAAM;IACN,UAAU;IACV,UAAU;IACV,MAAM;IACN,QAAQ;IACR,MAAM;CACT,CAAA;AAGD,eAAe,MAAM,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pimath",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.10",
|
|
4
4
|
"description": "A math library for teacher :)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -35,22 +35,22 @@
|
|
|
35
35
|
"author": "Basil Gass",
|
|
36
36
|
"license": "MIT",
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@eslint/js": "^9.
|
|
38
|
+
"@eslint/js": "^9.11.0",
|
|
39
39
|
"@types/eslint__js": "^8.42.3",
|
|
40
|
-
"autoprefixer": "^10.4.
|
|
40
|
+
"autoprefixer": "^10.4.20",
|
|
41
41
|
"dependency-cruiser": "^16.3.10",
|
|
42
|
-
"eslint": "^
|
|
43
|
-
"globals": "^15.
|
|
44
|
-
"postcss": "^8.4.
|
|
45
|
-
"tailwindcss": "^3.4.
|
|
42
|
+
"eslint": "^9.11.0",
|
|
43
|
+
"globals": "^15.9.0",
|
|
44
|
+
"postcss": "^8.4.47",
|
|
45
|
+
"tailwindcss": "^3.4.12",
|
|
46
46
|
"ts-loader": "^9.5.1",
|
|
47
47
|
"ts-node": "^10.9.2",
|
|
48
|
-
"typedoc": "^0.
|
|
49
|
-
"typescript": "^5.
|
|
50
|
-
"typescript-eslint": "^
|
|
51
|
-
"vite": "^5.
|
|
52
|
-
"vite-plugin-dts": "^
|
|
53
|
-
"vitest": "^1.
|
|
48
|
+
"typedoc": "^0.26.7",
|
|
49
|
+
"typescript": "^5.6.2",
|
|
50
|
+
"typescript-eslint": "^8.6.0",
|
|
51
|
+
"vite": "^5.4.7",
|
|
52
|
+
"vite-plugin-dts": "^4.2.1",
|
|
53
|
+
"vitest": "^2.1.1"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"piexpression": "^0.0.8"
|
package/types/index.d.ts
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
import { Fraction } from
|
|
2
|
-
import { NthRoot } from
|
|
3
|
-
import { Monom } from
|
|
4
|
-
import { Polynom } from
|
|
5
|
-
import { Factor } from
|
|
6
|
-
import { PolyFactor } from
|
|
7
|
-
import { Equation } from
|
|
8
|
-
import { LinearSystem } from
|
|
9
|
-
import { Circle } from
|
|
10
|
-
import { Line } from
|
|
11
|
-
import { Point } from
|
|
12
|
-
import { Triangle } from
|
|
13
|
-
import { Vector } from
|
|
14
|
-
import { Line3 } from
|
|
15
|
-
import { Plane3 } from
|
|
16
|
-
import { Matrix } from
|
|
17
|
-
import { NumExp } from
|
|
18
|
-
import { LogicalSet } from
|
|
19
|
-
|
|
1
|
+
import { Fraction } from "./coefficients/fraction";
|
|
2
|
+
import { NthRoot } from "./coefficients/nthRoot";
|
|
3
|
+
import { Monom } from "./algebra/monom";
|
|
4
|
+
import { Polynom } from "./algebra/polynom";
|
|
5
|
+
import { Factor } from "./algebra/factor";
|
|
6
|
+
import { PolyFactor } from "./algebra/polyFactor";
|
|
7
|
+
import { Equation } from "./algebra/equation";
|
|
8
|
+
import { LinearSystem } from "./algebra/linearSystem";
|
|
9
|
+
import { Circle } from "./geometry/circle";
|
|
10
|
+
import { Line } from "./geometry/line";
|
|
11
|
+
import { Point } from "./geometry/point";
|
|
12
|
+
import { Triangle } from "./geometry/triangle";
|
|
13
|
+
import { Vector } from "./geometry/vector";
|
|
14
|
+
import { Line3 } from "./geometry/line3";
|
|
15
|
+
import { Plane3 } from "./geometry/plane3";
|
|
16
|
+
import { Matrix } from "./geometry/matrix";
|
|
17
|
+
import { NumExp } from "piexpression";
|
|
18
|
+
import { LogicalSet } from "./algebra/logicalset";
|
|
20
19
|
declare const PiMath: {
|
|
21
20
|
Numeric: {
|
|
22
21
|
decompose: (value: number) => number[][];
|
|
@@ -26,8 +25,8 @@ declare const PiMath: {
|
|
|
26
25
|
lcm: (...values: number[]) => number;
|
|
27
26
|
numberCorrection: (value: number, number_of_digits?: number) => number;
|
|
28
27
|
periodic: (value: number) => number;
|
|
29
|
-
primes: (nb?: number
|
|
30
|
-
pythagoreanTripletsWithTarget: (target: number, targetIsSquare?: boolean
|
|
28
|
+
primes: (nb?: number) => number[];
|
|
29
|
+
pythagoreanTripletsWithTarget: (target: number, targetIsSquare?: boolean) => number[][];
|
|
31
30
|
round: (value: number, decimals?: number) => number;
|
|
32
31
|
};
|
|
33
32
|
Fraction: typeof Fraction;
|
|
@@ -41,21 +40,22 @@ declare const PiMath: {
|
|
|
41
40
|
PolyFactor: typeof PolyFactor;
|
|
42
41
|
LogicalSet: typeof LogicalSet;
|
|
43
42
|
Random: {
|
|
44
|
-
equation: (config?: import(
|
|
45
|
-
polynom: (config?: import(
|
|
46
|
-
monom: (config?: import(
|
|
47
|
-
fraction: (config?: import(
|
|
48
|
-
number: (from: number, to: number, exclude?: number[]
|
|
49
|
-
numberSym: (max: number, allowZero?: boolean
|
|
43
|
+
equation: (config?: import("./randomization/rndTypes").randomEquationConfig) => Equation;
|
|
44
|
+
polynom: (config?: import("./randomization/rndTypes").randomPolynomConfig) => Polynom;
|
|
45
|
+
monom: (config?: import("./randomization/rndTypes").randomMonomConfig) => Monom;
|
|
46
|
+
fraction: (config?: import("./randomization/rndTypes").randomCoefficientConfig) => Fraction;
|
|
47
|
+
number: (from: number, to: number, exclude?: number[]) => number;
|
|
48
|
+
numberSym: (max: number, allowZero?: boolean) => number;
|
|
50
49
|
prime: (max: number) => number;
|
|
51
|
-
bool: (percent?: number
|
|
52
|
-
array: <T>(arr: T[], number?: number
|
|
53
|
-
item: <
|
|
54
|
-
shuffle: <
|
|
55
|
-
line: (config?: import(
|
|
56
|
-
line3: (config?: import(
|
|
57
|
-
|
|
58
|
-
|
|
50
|
+
bool: (percent?: number) => boolean;
|
|
51
|
+
array: <T>(arr: T[], number?: number) => T[];
|
|
52
|
+
item: <T>(arr: T[]) => T;
|
|
53
|
+
shuffle: <T>(arr: T[]) => T[];
|
|
54
|
+
line: (config?: import("./randomization/rndTypes").randomGeometryLineConfig) => Line;
|
|
55
|
+
line3: (config?: import("./randomization/rndTypes").randomGeometryLine3Config) => Line3;
|
|
56
|
+
vector: (config?: import("./randomization/rndTypes").randomGeometryPointConfig) => Point;
|
|
57
|
+
point: (config?: import("./randomization/rndTypes").randomGeometryPointConfig) => Point;
|
|
58
|
+
circle: (config?: import("./randomization/rndTypes").randomGeometryCircleConfig) => Circle;
|
|
59
59
|
};
|
|
60
60
|
Geometry: {
|
|
61
61
|
Vector: typeof Vector;
|
|
@@ -69,4 +69,4 @@ declare const PiMath: {
|
|
|
69
69
|
NumExp: typeof NumExp;
|
|
70
70
|
};
|
|
71
71
|
export default PiMath;
|
|
72
|
-
|
|
72
|
+
//# sourceMappingURL=index.d.ts.map
|
package/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d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