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.
Files changed (82) hide show
  1. package/dist/pimath.js +3280 -3043
  2. package/dist/pimath.js.map +1 -1
  3. package/package.json +26 -21
  4. package/types/algebra/equation.d.ts.map +1 -0
  5. package/types/algebra/equationSolver.d.ts.map +1 -0
  6. package/types/algebra/factor.d.ts.map +1 -0
  7. package/{dist → types}/algebra/index.d.ts +1 -0
  8. package/types/algebra/index.d.ts.map +1 -0
  9. package/types/algebra/linearSystem.d.ts.map +1 -0
  10. package/types/algebra/logicalset.d.ts.map +1 -0
  11. package/types/algebra/matrix.d.ts +51 -0
  12. package/types/algebra/matrix.d.ts.map +1 -0
  13. package/types/algebra/monom.d.ts.map +1 -0
  14. package/types/algebra/operations.d.ts +2 -0
  15. package/types/algebra/operations.d.ts.map +1 -0
  16. package/types/algebra/polyFactor.d.ts.map +1 -0
  17. package/{dist → types}/algebra/polynom.d.ts +3 -1
  18. package/types/algebra/polynom.d.ts.map +1 -0
  19. package/{dist → types}/coefficients/fraction.d.ts +8 -2
  20. package/types/coefficients/fraction.d.ts.map +1 -0
  21. package/types/coefficients/index.d.ts.map +1 -0
  22. package/types/coefficients/nthRoot.d.ts.map +1 -0
  23. package/types/geometry/circle.d.ts.map +1 -0
  24. package/{dist → types}/geometry/geomMath.d.ts +2 -2
  25. package/types/geometry/geomMath.d.ts.map +1 -0
  26. package/{dist → types}/geometry/index.d.ts +0 -1
  27. package/types/geometry/index.d.ts.map +1 -0
  28. package/types/geometry/line.d.ts.map +1 -0
  29. package/types/geometry/line3.d.ts.map +1 -0
  30. package/types/geometry/plane3.d.ts.map +1 -0
  31. package/types/geometry/point.d.ts.map +1 -0
  32. package/types/geometry/sphere3.d.ts.map +1 -0
  33. package/types/geometry/triangle.d.ts.map +1 -0
  34. package/types/geometry/vector.d.ts.map +1 -0
  35. package/types/helpers.d.ts.map +1 -0
  36. package/{dist → types}/index.d.ts +2 -2
  37. package/types/index.d.ts.map +1 -0
  38. package/types/numeric.d.ts.map +1 -0
  39. package/{dist → types}/pimath.interface.d.ts +8 -4
  40. package/types/pimath.interface.d.ts.map +1 -0
  41. package/types/randomization/algebra/rndEquation.d.ts.map +1 -0
  42. package/types/randomization/algebra/rndMonom.d.ts.map +1 -0
  43. package/types/randomization/algebra/rndPolynom.d.ts.map +1 -0
  44. package/types/randomization/coefficient/rndFraction.d.ts.map +1 -0
  45. package/types/randomization/geometry/rndCircle.d.ts.map +1 -0
  46. package/types/randomization/geometry/rndLine.d.ts.map +1 -0
  47. package/types/randomization/geometry/rndLine3.d.ts.map +1 -0
  48. package/types/randomization/geometry/rndVector.d.ts.map +1 -0
  49. package/types/randomization/random.d.ts.map +1 -0
  50. package/types/randomization/rndHelpers.d.ts.map +1 -0
  51. package/types/randomization/rndTypes.d.ts.map +1 -0
  52. package/{dist → types}/algebra/equation.d.ts +0 -0
  53. package/{dist → types}/algebra/equationSolver.d.ts +0 -0
  54. package/{dist → types}/algebra/factor.d.ts +0 -0
  55. package/{dist → types}/algebra/linearSystem.d.ts +0 -0
  56. package/{dist → types}/algebra/logicalset.d.ts +0 -0
  57. package/{dist → types}/algebra/monom.d.ts +0 -0
  58. package/{dist → types}/algebra/polyFactor.d.ts +0 -0
  59. package/{dist → types}/coefficients/index.d.ts +0 -0
  60. package/{dist → types}/coefficients/nthRoot.d.ts +0 -0
  61. package/{dist → types}/geometry/circle.d.ts +0 -0
  62. package/{dist → types}/geometry/line.d.ts +47 -47
  63. /package/{dist → types}/geometry/line3.d.ts +0 -0
  64. /package/{dist → types}/geometry/matrix.d.ts +0 -0
  65. /package/{dist → types}/geometry/plane3.d.ts +0 -0
  66. /package/{dist → types}/geometry/point.d.ts +0 -0
  67. /package/{dist → types}/geometry/sphere3.d.ts +0 -0
  68. /package/{dist → types}/geometry/triangle.d.ts +0 -0
  69. /package/{dist → types}/geometry/vector.d.ts +0 -0
  70. /package/{dist → types}/helpers.d.ts +0 -0
  71. /package/{dist → types}/numeric.d.ts +0 -0
  72. /package/{dist → types}/randomization/algebra/rndEquation.d.ts +0 -0
  73. /package/{dist → types}/randomization/algebra/rndMonom.d.ts +0 -0
  74. /package/{dist → types}/randomization/algebra/rndPolynom.d.ts +0 -0
  75. /package/{dist → types}/randomization/coefficient/rndFraction.d.ts +0 -0
  76. /package/{dist → types}/randomization/geometry/rndCircle.d.ts +0 -0
  77. /package/{dist → types}/randomization/geometry/rndLine.d.ts +0 -0
  78. /package/{dist → types}/randomization/geometry/rndLine3.d.ts +0 -0
  79. /package/{dist → types}/randomization/geometry/rndVector.d.ts +0 -0
  80. /package/{dist → types}/randomization/random.d.ts +0 -0
  81. /package/{dist → types}/randomization/rndHelpers.d.ts +0 -0
  82. /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 OA(): Vector;
29
- set OA(value: Vector);
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
- get slope(): Fraction;
46
- get height(): Fraction;
47
- randomPoint: (k?: number) => Point;
48
- randomNearPoint: (k?: number) => Point;
49
- /**
50
- * Parse data to a line
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
- clone: () => this;
62
- isOnLine: (pt: Vector) => boolean;
63
- isParallelTo: (line: Line) => boolean;
64
- isSameAs: (line: Line) => boolean;
65
- isPerpendicularTo: (line: Line) => boolean;
66
- isVertical: () => boolean;
67
- simplify: () => this;
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
- distanceTo(pt: Point): {
76
- value: number;
77
- fraction: Fraction;
78
- tex: string;
79
- };
80
- hitSegment(A: Point, B: Point): boolean;
81
- getValueAtX: (value: Fraction | number) => Fraction;
82
- getValueAtY: (value: Fraction | number) => Fraction;
83
- canonicalAsFloatCoefficient(decimals?: number): string;
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