pimath 0.1.32 → 0.1.34
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/pimath.js +3280 -3043
- package/dist/pimath.js.map +1 -1
- package/package.json +26 -21
- package/types/algebra/equation.d.ts.map +1 -0
- package/types/algebra/equationSolver.d.ts.map +1 -0
- package/types/algebra/factor.d.ts.map +1 -0
- package/{dist → types}/algebra/index.d.ts +1 -0
- package/types/algebra/index.d.ts.map +1 -0
- package/types/algebra/linearSystem.d.ts.map +1 -0
- package/types/algebra/logicalset.d.ts.map +1 -0
- package/types/algebra/matrix.d.ts +51 -0
- package/types/algebra/matrix.d.ts.map +1 -0
- package/types/algebra/monom.d.ts.map +1 -0
- package/types/algebra/operations.d.ts +2 -0
- package/types/algebra/operations.d.ts.map +1 -0
- package/types/algebra/polyFactor.d.ts.map +1 -0
- package/{dist → types}/algebra/polynom.d.ts +3 -1
- package/types/algebra/polynom.d.ts.map +1 -0
- package/{dist → types}/coefficients/fraction.d.ts +8 -2
- package/types/coefficients/fraction.d.ts.map +1 -0
- package/types/coefficients/index.d.ts.map +1 -0
- package/types/coefficients/nthRoot.d.ts.map +1 -0
- package/types/geometry/circle.d.ts.map +1 -0
- package/{dist → types}/geometry/geomMath.d.ts +2 -2
- package/types/geometry/geomMath.d.ts.map +1 -0
- package/{dist → types}/geometry/index.d.ts +0 -1
- package/types/geometry/index.d.ts.map +1 -0
- package/types/geometry/line.d.ts.map +1 -0
- package/types/geometry/line3.d.ts.map +1 -0
- package/types/geometry/plane3.d.ts.map +1 -0
- package/types/geometry/point.d.ts.map +1 -0
- package/types/geometry/sphere3.d.ts.map +1 -0
- package/types/geometry/triangle.d.ts.map +1 -0
- package/types/geometry/vector.d.ts.map +1 -0
- package/types/helpers.d.ts.map +1 -0
- package/{dist → types}/index.d.ts +2 -2
- package/types/index.d.ts.map +1 -0
- package/types/numeric.d.ts.map +1 -0
- package/{dist → types}/pimath.interface.d.ts +8 -4
- package/types/pimath.interface.d.ts.map +1 -0
- package/types/randomization/algebra/rndEquation.d.ts.map +1 -0
- package/types/randomization/algebra/rndMonom.d.ts.map +1 -0
- package/types/randomization/algebra/rndPolynom.d.ts.map +1 -0
- package/types/randomization/coefficient/rndFraction.d.ts.map +1 -0
- package/types/randomization/geometry/rndCircle.d.ts.map +1 -0
- package/types/randomization/geometry/rndLine.d.ts.map +1 -0
- package/types/randomization/geometry/rndLine3.d.ts.map +1 -0
- package/types/randomization/geometry/rndVector.d.ts.map +1 -0
- package/types/randomization/random.d.ts.map +1 -0
- package/types/randomization/rndHelpers.d.ts.map +1 -0
- package/types/randomization/rndTypes.d.ts.map +1 -0
- package/{dist → types}/algebra/equation.d.ts +0 -0
- package/{dist → types}/algebra/equationSolver.d.ts +0 -0
- package/{dist → types}/algebra/factor.d.ts +0 -0
- package/{dist → types}/algebra/linearSystem.d.ts +0 -0
- package/{dist → types}/algebra/logicalset.d.ts +0 -0
- package/{dist → types}/algebra/monom.d.ts +0 -0
- package/{dist → types}/algebra/polyFactor.d.ts +0 -0
- package/{dist → types}/coefficients/index.d.ts +0 -0
- package/{dist → types}/coefficients/nthRoot.d.ts +0 -0
- package/{dist → types}/geometry/circle.d.ts +0 -0
- package/{dist → types}/geometry/line.d.ts +47 -47
- /package/{dist → types}/geometry/line3.d.ts +0 -0
- /package/{dist → types}/geometry/matrix.d.ts +0 -0
- /package/{dist → types}/geometry/plane3.d.ts +0 -0
- /package/{dist → types}/geometry/point.d.ts +0 -0
- /package/{dist → types}/geometry/sphere3.d.ts +0 -0
- /package/{dist → types}/geometry/triangle.d.ts +0 -0
- /package/{dist → types}/geometry/vector.d.ts +0 -0
- /package/{dist → types}/helpers.d.ts +0 -0
- /package/{dist → types}/numeric.d.ts +0 -0
- /package/{dist → types}/randomization/algebra/rndEquation.d.ts +0 -0
- /package/{dist → types}/randomization/algebra/rndMonom.d.ts +0 -0
- /package/{dist → types}/randomization/algebra/rndPolynom.d.ts +0 -0
- /package/{dist → types}/randomization/coefficient/rndFraction.d.ts +0 -0
- /package/{dist → types}/randomization/geometry/rndCircle.d.ts +0 -0
- /package/{dist → types}/randomization/geometry/rndLine.d.ts +0 -0
- /package/{dist → types}/randomization/geometry/rndLine3.d.ts +0 -0
- /package/{dist → types}/randomization/geometry/rndVector.d.ts +0 -0
- /package/{dist → types}/randomization/random.d.ts +0 -0
- /package/{dist → types}/randomization/rndHelpers.d.ts +0 -0
- /package/{dist → types}/randomization/rndTypes.d.ts +0 -0
|
@@ -4,81 +4,81 @@ import { Vector } from './vector';
|
|
|
4
4
|
import { InputValue, IPiMathObject, LinePropriety } from '../pimath.interface';
|
|
5
5
|
import { Point } from './point';
|
|
6
6
|
export interface LineConfig {
|
|
7
|
-
points?: Point[];
|
|
8
|
-
point?: Point;
|
|
9
7
|
direction?: Vector;
|
|
10
8
|
normal?: Vector;
|
|
9
|
+
point?: Point;
|
|
10
|
+
points?: Point[];
|
|
11
11
|
}
|
|
12
12
|
export declare class Line implements IPiMathObject<Line> {
|
|
13
13
|
#private;
|
|
14
|
-
static PERPENDICULAR: LinePropriety;
|
|
15
14
|
static PARALLEL: LinePropriety;
|
|
15
|
+
static PERPENDICULAR: LinePropriety;
|
|
16
16
|
/**
|
|
17
17
|
* Value can be a mix of:
|
|
18
18
|
*
|
|
19
19
|
* @param values
|
|
20
20
|
*/
|
|
21
21
|
constructor(...values: unknown[]);
|
|
22
|
+
/**
|
|
23
|
+
* Parse data to a line
|
|
24
|
+
* @param {any} values
|
|
25
|
+
* @returns {Line}
|
|
26
|
+
*/
|
|
27
|
+
parse: (...values: unknown[]) => this;
|
|
28
|
+
clone: () => this;
|
|
29
|
+
get tex(): string;
|
|
30
|
+
get display(): string;
|
|
31
|
+
get OA(): Vector;
|
|
32
|
+
set OA(value: Vector);
|
|
22
33
|
get a(): Fraction;
|
|
23
34
|
set a(value: Fraction);
|
|
24
35
|
get b(): Fraction;
|
|
25
36
|
set b(value: Fraction);
|
|
26
37
|
get c(): Fraction;
|
|
27
38
|
set c(value: Fraction);
|
|
28
|
-
get
|
|
29
|
-
|
|
39
|
+
get canonical(): this;
|
|
40
|
+
canonicalAsFloatCoefficient(decimals?: number): string;
|
|
30
41
|
get d(): Vector;
|
|
31
42
|
set d(value: Vector);
|
|
32
|
-
get n(): Vector;
|
|
33
|
-
getEquation(): Equation;
|
|
34
|
-
get canonical(): this;
|
|
35
|
-
get equation(): this;
|
|
36
|
-
get mxh(): this;
|
|
37
|
-
get parametric(): this;
|
|
38
|
-
get system(): this;
|
|
39
|
-
get tex(): string;
|
|
40
|
-
get reduceBeforeDisplay(): boolean;
|
|
41
|
-
set reduceBeforeDisplay(value: boolean);
|
|
42
|
-
get display(): string;
|
|
43
|
-
get normal(): Vector;
|
|
44
43
|
get director(): Vector;
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
* @param {any} values
|
|
52
|
-
* @returns {Line}
|
|
53
|
-
*/
|
|
54
|
-
parse: (...values: unknown[]) => this;
|
|
55
|
-
fromPoints(pt1: Point, pt2: Point): this;
|
|
56
|
-
fromEquation: (equ: Equation) => this;
|
|
44
|
+
distanceTo(pt: Point): {
|
|
45
|
+
value: number;
|
|
46
|
+
fraction: Fraction;
|
|
47
|
+
tex: string;
|
|
48
|
+
};
|
|
49
|
+
get equation(): this;
|
|
57
50
|
fromCoefficient: (a: InputValue<Fraction>, b: InputValue<Fraction>, c: InputValue<Fraction>) => this;
|
|
51
|
+
fromEquation: (equ: Equation) => this;
|
|
58
52
|
fromPointAndDirection: (P: Point, d: Vector) => this;
|
|
59
|
-
fromPointAndNormal: (P: Point, n: Vector) => this;
|
|
60
53
|
fromPointAndLine: (P: Vector, L: Line, orientation?: LinePropriety) => this;
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
simplifyDirection: () => this;
|
|
54
|
+
fromPointAndNormal: (P: Point, n: Vector) => this;
|
|
55
|
+
fromPoints(pt1: Point, pt2: Point): this;
|
|
56
|
+
getEquation(): Equation;
|
|
57
|
+
getValueAtX: (value: Fraction | number) => Fraction;
|
|
58
|
+
getValueAtY: (value: Fraction | number) => Fraction;
|
|
59
|
+
get height(): Fraction;
|
|
60
|
+
hitSegment(A: Point, B: Point): boolean;
|
|
69
61
|
intersection: (line: Line) => {
|
|
70
62
|
point: Point;
|
|
71
63
|
hasIntersection: boolean;
|
|
72
64
|
isParallel: boolean;
|
|
73
65
|
isSame: boolean;
|
|
74
66
|
};
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
67
|
+
isOnLine: (pt: Vector) => boolean;
|
|
68
|
+
isParallelTo: (line: Line) => boolean;
|
|
69
|
+
isPerpendicularTo: (line: Line) => boolean;
|
|
70
|
+
isSameAs: (line: Line) => boolean;
|
|
71
|
+
isVertical: () => boolean;
|
|
72
|
+
get mxh(): this;
|
|
73
|
+
get n(): Vector;
|
|
74
|
+
get normal(): Vector;
|
|
75
|
+
get parametric(): this;
|
|
76
|
+
randomNearPoint: (k?: number) => Point;
|
|
77
|
+
randomPoint: (k?: number) => Point;
|
|
78
|
+
get reduceBeforeDisplay(): boolean;
|
|
79
|
+
set reduceBeforeDisplay(value: boolean);
|
|
80
|
+
simplify: () => this;
|
|
81
|
+
simplifyDirection: () => this;
|
|
82
|
+
get slope(): Fraction;
|
|
83
|
+
get system(): this;
|
|
84
84
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|