pimath 0.1.18 → 0.1.20
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/{types → dist}/algebra/equation.d.ts +1 -2
- package/dist/algebra/index.d.ts +8 -0
- package/dist/coefficients/index.d.ts +2 -0
- package/{types → dist}/geometry/circle.d.ts +2 -2
- package/dist/geometry/index.d.ts +9 -0
- package/{types → dist}/geometry/line.d.ts +1 -7
- package/{types → dist}/geometry/line3.d.ts +3 -8
- package/{types → dist}/geometry/plane3.d.ts +1 -10
- package/{types → dist}/geometry/triangle.d.ts +1 -32
- package/{types → dist}/index.d.ts +6 -17
- package/{types → dist}/pimath.interface.d.ts +55 -0
- package/dist/pimath.js +1500 -1486
- package/dist/pimath.js.map +1 -0
- package/dist/randomization/random.d.ts +20 -0
- package/package.json +7 -11
- package/types/algebra/equation.d.ts.map +0 -1
- package/types/algebra/equationSolver.d.ts.map +0 -1
- package/types/algebra/factor.d.ts.map +0 -1
- package/types/algebra/linearSystem.d.ts.map +0 -1
- package/types/algebra/logicalset.d.ts.map +0 -1
- package/types/algebra/monom.d.ts.map +0 -1
- package/types/algebra/polyFactor.d.ts.map +0 -1
- package/types/algebra/polynom.d.ts.map +0 -1
- package/types/coefficients/fraction.d.ts.map +0 -1
- package/types/coefficients/nthRoot.d.ts.map +0 -1
- package/types/geometry/circle.d.ts.map +0 -1
- package/types/geometry/geomMath.d.ts.map +0 -1
- package/types/geometry/line.d.ts.map +0 -1
- package/types/geometry/line3.d.ts.map +0 -1
- package/types/geometry/matrix.d.ts.map +0 -1
- package/types/geometry/plane3.d.ts.map +0 -1
- package/types/geometry/point.d.ts.map +0 -1
- package/types/geometry/triangle.d.ts.map +0 -1
- package/types/geometry/vector.d.ts.map +0 -1
- package/types/helpers.d.ts.map +0 -1
- package/types/index.d.ts.map +0 -1
- package/types/numeric.d.ts.map +0 -1
- package/types/pimath.interface.d.ts.map +0 -1
- package/types/randomization/algebra/rndEquation.d.ts.map +0 -1
- package/types/randomization/algebra/rndMonom.d.ts.map +0 -1
- package/types/randomization/algebra/rndPolynom.d.ts.map +0 -1
- package/types/randomization/coefficient/rndFraction.d.ts.map +0 -1
- package/types/randomization/geometry/rndCircle.d.ts.map +0 -1
- package/types/randomization/geometry/rndLine.d.ts.map +0 -1
- package/types/randomization/geometry/rndLine3.d.ts.map +0 -1
- package/types/randomization/geometry/rndVector.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.map +0 -1
- package/types/randomization/rndTypes.d.ts.map +0 -1
- /package/{types → dist}/algebra/equationSolver.d.ts +0 -0
- /package/{types → dist}/algebra/factor.d.ts +0 -0
- /package/{types → dist}/algebra/linearSystem.d.ts +0 -0
- /package/{types → dist}/algebra/logicalset.d.ts +0 -0
- /package/{types → dist}/algebra/monom.d.ts +0 -0
- /package/{types → dist}/algebra/polyFactor.d.ts +0 -0
- /package/{types → dist}/algebra/polynom.d.ts +0 -0
- /package/{types → dist}/coefficients/fraction.d.ts +0 -0
- /package/{types → dist}/coefficients/nthRoot.d.ts +0 -0
- /package/{types → dist}/geometry/geomMath.d.ts +0 -0
- /package/{types → dist}/geometry/matrix.d.ts +0 -0
- /package/{types → dist}/geometry/point.d.ts +0 -0
- /package/{types → dist}/geometry/vector.d.ts +0 -0
- /package/{types → dist}/helpers.d.ts +0 -0
- /package/{types → dist}/numeric.d.ts +0 -0
- /package/{types → dist}/randomization/algebra/rndEquation.d.ts +0 -0
- /package/{types → dist}/randomization/algebra/rndMonom.d.ts +0 -0
- /package/{types → dist}/randomization/algebra/rndPolynom.d.ts +0 -0
- /package/{types → dist}/randomization/coefficient/rndFraction.d.ts +0 -0
- /package/{types → dist}/randomization/geometry/rndCircle.d.ts +0 -0
- /package/{types → dist}/randomization/geometry/rndLine.d.ts +0 -0
- /package/{types → dist}/randomization/geometry/rndLine3.d.ts +0 -0
- /package/{types → dist}/randomization/geometry/rndVector.d.ts +0 -0
- /package/{types → dist}/randomization/rndHelpers.d.ts +0 -0
- /package/{types → dist}/randomization/rndTypes.d.ts +0 -0
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { IAlgebra, IEquation, InputAlgebra, InputValue, IPiMathObject, ISolution, literalType } from '../pimath.interface';
|
|
1
|
+
import { EQUATION_SIGN, IAlgebra, IEquation, InputAlgebra, InputValue, IPiMathObject, ISolution, literalType } from '../pimath.interface';
|
|
2
2
|
import { Fraction } from '../coefficients/fraction';
|
|
3
3
|
import { Polynom } from './polynom';
|
|
4
|
-
export type EQUATION_SIGN = "=" | "<=" | ">=" | "<" | ">";
|
|
5
4
|
export declare class Equation implements IPiMathObject<Equation>, IEquation<Equation>, IAlgebra<Equation> {
|
|
6
5
|
#private;
|
|
7
6
|
constructor(equation: InputAlgebra<Polynom> | Equation);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Line } from './line';
|
|
2
|
-
import { Fraction } from '../coefficients
|
|
3
|
-
import { Equation } from '../algebra
|
|
2
|
+
import { Fraction } from '../coefficients';
|
|
3
|
+
import { Equation } from '../algebra';
|
|
4
4
|
import { IPiMathObject } from '../pimath.interface';
|
|
5
5
|
import { Point } from './point';
|
|
6
6
|
export declare class Circle implements IPiMathObject<Circle> {
|
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
import { Fraction } from '../coefficients/fraction';
|
|
2
2
|
import { Equation } from '../algebra/equation';
|
|
3
3
|
import { Vector } from './vector';
|
|
4
|
-
import { InputValue, IPiMathObject } from '../pimath.interface';
|
|
4
|
+
import { InputValue, IPiMathObject, LinePropriety } from '../pimath.interface';
|
|
5
5
|
import { Point } from './point';
|
|
6
|
-
export declare enum LinePropriety {
|
|
7
|
-
None = "none",
|
|
8
|
-
Parallel = "parallel",
|
|
9
|
-
Perpendicular = "perpendicular",
|
|
10
|
-
Tangent = "tangent"
|
|
11
|
-
}
|
|
12
6
|
export interface LineConfig {
|
|
13
7
|
points?: Point[];
|
|
14
8
|
point?: Point;
|
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
import { Fraction } from '../coefficients/fraction';
|
|
2
2
|
import { Vector } from './vector';
|
|
3
3
|
import { Point } from './point';
|
|
4
|
-
|
|
5
|
-
None = "none",
|
|
6
|
-
Parallel = "parallel",
|
|
7
|
-
Perpendicular = "perpendicular",
|
|
8
|
-
Tangent = "tangent"
|
|
9
|
-
}
|
|
4
|
+
import { Line3Propriety } from '../pimath.interface';
|
|
10
5
|
export declare class Line3 {
|
|
11
6
|
#private;
|
|
12
|
-
static PERPENDICULAR:
|
|
13
|
-
static PARALLEL:
|
|
7
|
+
static PERPENDICULAR: Line3Propriety;
|
|
8
|
+
static PARALLEL: Line3Propriety;
|
|
14
9
|
/**
|
|
15
10
|
* Value can be a mix of:
|
|
16
11
|
*
|
|
@@ -1,16 +1,8 @@
|
|
|
1
|
-
import { Equation } from '../algebra/equation';
|
|
2
1
|
import { Fraction } from '../coefficients/fraction';
|
|
3
2
|
import { Line3 } from './line3';
|
|
4
3
|
import { Point } from './point';
|
|
5
4
|
import { Vector } from './vector';
|
|
6
|
-
|
|
7
|
-
point?: Point;
|
|
8
|
-
normal?: Vector;
|
|
9
|
-
directions?: Vector[];
|
|
10
|
-
equation?: Equation;
|
|
11
|
-
points?: Point[];
|
|
12
|
-
coefficients?: number[];
|
|
13
|
-
}
|
|
5
|
+
import { Plane3Config } from '../pimath.interface';
|
|
14
6
|
export declare class Plane3 {
|
|
15
7
|
#private;
|
|
16
8
|
constructor(config?: Plane3Config);
|
|
@@ -32,4 +24,3 @@ export declare class Plane3 {
|
|
|
32
24
|
intersectWithPlane(plane: Plane3): Line3;
|
|
33
25
|
isPointOnPlane(pt: Point): boolean;
|
|
34
26
|
}
|
|
35
|
-
export {};
|
|
@@ -1,38 +1,7 @@
|
|
|
1
1
|
import { Line } from './line';
|
|
2
2
|
import { Vector } from './vector';
|
|
3
3
|
import { Point } from './point';
|
|
4
|
-
|
|
5
|
-
'medians': {
|
|
6
|
-
'A': Line;
|
|
7
|
-
'B': Line;
|
|
8
|
-
'C': Line;
|
|
9
|
-
'intersection': Vector | null;
|
|
10
|
-
};
|
|
11
|
-
'mediators': {
|
|
12
|
-
'AB': Line;
|
|
13
|
-
'AC': Line;
|
|
14
|
-
'BC': Line;
|
|
15
|
-
'intersection': Vector | null;
|
|
16
|
-
};
|
|
17
|
-
'heights': {
|
|
18
|
-
'A': Line;
|
|
19
|
-
'B': Line;
|
|
20
|
-
'C': Line;
|
|
21
|
-
'intersection': Vector | null;
|
|
22
|
-
};
|
|
23
|
-
'bisectors': {
|
|
24
|
-
'A': Line;
|
|
25
|
-
'B': Line;
|
|
26
|
-
'C': Line;
|
|
27
|
-
'intersection': Vector | null;
|
|
28
|
-
};
|
|
29
|
-
externalBisectors: {
|
|
30
|
-
'A': Line;
|
|
31
|
-
'B': Line;
|
|
32
|
-
'C': Line;
|
|
33
|
-
'intersection': Vector | null;
|
|
34
|
-
};
|
|
35
|
-
}
|
|
4
|
+
import { remarquableLines } from '../pimath.interface';
|
|
36
5
|
export declare class Triangle {
|
|
37
6
|
#private;
|
|
38
7
|
constructor(...values: unknown[]);
|
|
@@ -1,21 +1,10 @@
|
|
|
1
|
-
import { Fraction } from './coefficients
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
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';
|
|
1
|
+
import { Fraction, NthRoot } from './coefficients';
|
|
2
|
+
import { Equation, Factor, LinearSystem, LogicalSet, Monom, PolyFactor, Polynom } from './algebra';
|
|
3
|
+
import { Circle, Line, Line3, Matrix, Plane3, Point, Triangle, Vector } from './geometry';
|
|
17
4
|
import { NumExp } from 'piexpression';
|
|
18
|
-
|
|
5
|
+
export * from './coefficients';
|
|
6
|
+
export * from './algebra';
|
|
7
|
+
export * from './geometry';
|
|
19
8
|
export type * from './pimath.interface';
|
|
20
9
|
declare const PiMath: {
|
|
21
10
|
Numeric: {
|
|
@@ -2,10 +2,13 @@ import { Fraction } from './coefficients/fraction';
|
|
|
2
2
|
import { NthRoot } from './coefficients/nthRoot';
|
|
3
3
|
import { Monom } from './algebra/monom';
|
|
4
4
|
import { Factor } from './algebra/factor';
|
|
5
|
+
import { Line, Point, Vector } from './geometry';
|
|
6
|
+
import { Equation } from './algebra';
|
|
5
7
|
export type InputValue<T> = T | string | number | Fraction | NthRoot;
|
|
6
8
|
export type InputAlgebra<T> = InputValue<T> | Monom;
|
|
7
9
|
export type literalType<T> = Record<string, T>;
|
|
8
10
|
export type compareSign = '>' | ">=" | "=>" | "geq" | '<' | "<=" | "=<" | "leq" | '=' | "<>" | "neq" | "same";
|
|
11
|
+
export type EQUATION_SIGN = "=" | "<=" | ">=" | "<" | ">";
|
|
9
12
|
export declare enum PARTICULAR_SOLUTION {
|
|
10
13
|
real = "\\mathbb{R}",
|
|
11
14
|
varnothing = "\\varnothing"
|
|
@@ -66,3 +69,55 @@ export interface FACTOR_TABLE_OF_SIGNS extends TABLE_OF_SIGNS {
|
|
|
66
69
|
export interface POLYFACTOR_TABLE_OF_SIGNS extends TABLE_OF_SIGNS {
|
|
67
70
|
factors: FACTOR_TABLE_OF_SIGNS[];
|
|
68
71
|
}
|
|
72
|
+
export declare enum LinePropriety {
|
|
73
|
+
None = "none",
|
|
74
|
+
Parallel = "parallel",
|
|
75
|
+
Perpendicular = "perpendicular",
|
|
76
|
+
Tangent = "tangent"
|
|
77
|
+
}
|
|
78
|
+
export declare enum Line3Propriety {
|
|
79
|
+
None = "none",
|
|
80
|
+
Parallel = "parallel",
|
|
81
|
+
Perpendicular = "perpendicular",
|
|
82
|
+
Tangent = "tangent"
|
|
83
|
+
}
|
|
84
|
+
export interface Plane3Config {
|
|
85
|
+
point?: Point;
|
|
86
|
+
normal?: Vector;
|
|
87
|
+
directions?: Vector[];
|
|
88
|
+
equation?: Equation;
|
|
89
|
+
points?: Point[];
|
|
90
|
+
coefficients?: number[];
|
|
91
|
+
}
|
|
92
|
+
export interface remarquableLines {
|
|
93
|
+
'medians': {
|
|
94
|
+
'A': Line;
|
|
95
|
+
'B': Line;
|
|
96
|
+
'C': Line;
|
|
97
|
+
'intersection': Vector | null;
|
|
98
|
+
};
|
|
99
|
+
'mediators': {
|
|
100
|
+
'AB': Line;
|
|
101
|
+
'AC': Line;
|
|
102
|
+
'BC': Line;
|
|
103
|
+
'intersection': Vector | null;
|
|
104
|
+
};
|
|
105
|
+
'heights': {
|
|
106
|
+
'A': Line;
|
|
107
|
+
'B': Line;
|
|
108
|
+
'C': Line;
|
|
109
|
+
'intersection': Vector | null;
|
|
110
|
+
};
|
|
111
|
+
'bisectors': {
|
|
112
|
+
'A': Line;
|
|
113
|
+
'B': Line;
|
|
114
|
+
'C': Line;
|
|
115
|
+
'intersection': Vector | null;
|
|
116
|
+
};
|
|
117
|
+
externalBisectors: {
|
|
118
|
+
'A': Line;
|
|
119
|
+
'B': Line;
|
|
120
|
+
'C': Line;
|
|
121
|
+
'intersection': Vector | null;
|
|
122
|
+
};
|
|
123
|
+
}
|