pimath 0.0.121 → 0.0.122

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 (64) hide show
  1. package/.eslintrc.js +23 -23
  2. package/.idea/shelf/Uncommitted_changes_before_Update_at_24_07_2023_15_31_[Default_Changelist]/shelved.patch +90 -0
  3. package/.idea/shelf/Uncommitted_changes_before_Update_at_24_07_2023_15_31_[Default_Changelist]1/shelved.patch +107 -0
  4. package/.idea/shelf/Uncommitted_changes_before_Update_at_24_07_2023_15_31__Default_Changelist_.xml +4 -0
  5. package/.idea/shelf/Uncommitted_changes_before_Update_at_24_07_2023_15_31__Default_Changelist_1.xml +4 -0
  6. package/LICENSE.md +1 -1
  7. package/dev/pimath.js +7924 -7924
  8. package/dist/pimath.js +10 -9
  9. package/dist/pimath.js.map +1 -1
  10. package/dist/pimath.min.js +1 -1
  11. package/dist/pimath.min.js.map +1 -1
  12. package/docs/assets/main.js +58 -58
  13. package/docs/assets/style.css +1367 -1367
  14. package/docs/classes/Logicalset.Logicalset.html +220 -220
  15. package/docs/classes/Polynom.Rational.html +390 -390
  16. package/docs/classes/Vector-1.Vector.html +493 -493
  17. package/docs/classes/Vector.Point.html +340 -340
  18. package/docs/classes/algebra_equation.Equation.html +795 -795
  19. package/docs/classes/algebra_linearSystem.LinearSystem.html +407 -407
  20. package/docs/classes/algebra_monom.Monom.html +966 -966
  21. package/docs/classes/algebra_polynom.Polynom.html +1280 -1280
  22. package/docs/classes/coefficients_fraction.Fraction.html +938 -938
  23. package/docs/classes/geometry_circle.Circle.html +475 -475
  24. package/docs/classes/geometry_line.Line.html +778 -778
  25. package/docs/classes/geometry_triangle.Triangle.html +428 -428
  26. package/docs/classes/numeric.Numeric.html +268 -268
  27. package/docs/classes/shutingyard.Shutingyard.html +258 -258
  28. package/docs/enums/algebra_equation.PARTICULAR_SOLUTION.html +88 -88
  29. package/docs/enums/geometry_line.LinePropriety.html +101 -101
  30. package/docs/enums/shutingyard.ShutingyardMode.html +105 -105
  31. package/docs/enums/shutingyard.ShutingyardType.html +119 -119
  32. package/docs/index.html +62 -62
  33. package/docs/interfaces/algebra_equation.ISolution.html +110 -110
  34. package/docs/interfaces/algebra_polynom.IEuclidian.html +92 -92
  35. package/docs/interfaces/geometry_triangle.remarquableLines.html +149 -149
  36. package/docs/modules/Logicalset.html +68 -68
  37. package/docs/modules/Polynom.html +68 -68
  38. package/docs/modules/Vector-1.html +68 -68
  39. package/docs/modules/Vector.html +68 -68
  40. package/docs/modules/algebra_equation.html +74 -74
  41. package/docs/modules/algebra_linearSystem.html +64 -64
  42. package/docs/modules/algebra_monom.html +69 -69
  43. package/docs/modules/algebra_polynom.html +74 -74
  44. package/docs/modules/coefficients_fraction.html +69 -69
  45. package/docs/modules/geometry_circle.html +64 -64
  46. package/docs/modules/geometry_line.html +69 -69
  47. package/docs/modules/geometry_triangle.html +69 -69
  48. package/docs/modules/numeric.html +64 -64
  49. package/docs/modules/shutingyard.html +83 -83
  50. package/docs/types/algebra_monom.literalType.html +65 -65
  51. package/docs/types/algebra_polynom.PolynomParsingType.html +61 -61
  52. package/docs/types/coefficients_fraction.FractionParsingType.html +60 -60
  53. package/docs/types/shutingyard.Token.html +71 -71
  54. package/docs/types/shutingyard.tokenType.html +76 -76
  55. package/docs/variables/shutingyard.tokenConstant.html +69 -69
  56. package/esm/index.js +1 -1
  57. package/esm/index.js.map +1 -1
  58. package/esm/maths/algebra/study.d.ts +1 -0
  59. package/esm/maths/algebra/study.js +9 -8
  60. package/esm/maths/algebra/study.js.map +1 -1
  61. package/package.json +5 -5
  62. package/src/index.ts +1 -1
  63. package/src/maths/algebra/study.ts +11 -9
  64. package/tests/numexp.test.ts +12 -0
package/dist/pimath.js CHANGED
@@ -48,7 +48,7 @@ exports.l = {
48
48
  Circle: circle_1.Circle
49
49
  }
50
50
  };
51
- window.PiMath = exports.l;
51
+ window.Pi = exports.l;
52
52
 
53
53
 
54
54
  /***/ }),
@@ -3937,13 +3937,13 @@ class Study {
3937
3937
  return code;
3938
3938
  };
3939
3939
  this._makeTexFromTableOfSigns = (tos) => {
3940
- let factors = tos.factors.map(x => `\\(${x.tex}\\)/1`), factorsFx = `\\(${this._name}(x)\\)/1.2`, zeroes = tos.zeroes;
3940
+ let factors = tos.factors.map(x => `\\(${x.tex}\\)/1`), factorsFx = `\\(${this._config.name}(${this._config.variable})\\)/1.2`, zeroes = tos.zeroes;
3941
3941
  // Add the last lines "label"
3942
3942
  if (tos.type === TABLE_OF_SIGNS.GROWS) {
3943
- factorsFx = `\\(${this._name}'(x)\\)/1.2,\\(f(x)\\)/2`;
3943
+ factorsFx = `\\(${this._config.name}'(${this._config.variable})\\)/1.2,\\(f(x${this._config.variable})\\)/2`;
3944
3944
  }
3945
3945
  else if (tos.type === TABLE_OF_SIGNS.VARIATIONS) {
3946
- factorsFx = `\\(${this._name}''(x)\\)/1.2,\\(f(x)\\)/2`;
3946
+ factorsFx = `\\(${this._config.name}''(${this._config.variable})\\)/1.2,\\(f(${this._config.variable})\\)/2`;
3947
3947
  }
3948
3948
  // Create the tikzPicture header
3949
3949
  let tex = `\\begin{tikzpicture}
@@ -3968,6 +3968,7 @@ class Study {
3968
3968
  this.fx = fx;
3969
3969
  this._config = {
3970
3970
  name: 'f',
3971
+ variable: 'x',
3971
3972
  domain: true,
3972
3973
  asymptotes: true,
3973
3974
  signs: true,
@@ -3978,9 +3979,10 @@ class Study {
3978
3979
  if (typeof config === 'string') {
3979
3980
  const d = config.split(',');
3980
3981
  this._config = {};
3981
- let n = d.filter(x => x.includes('(x)'));
3982
+ let n = d.filter(x => x.includes('(') && x.includes(')'));
3982
3983
  if (n.length === 1) {
3983
- this._config.name = n[0].split('(x)')[0];
3984
+ this._config.name = n[0].split('(')[0];
3985
+ this._config.variable = n[0].split('(')[1].split(')')[0];
3984
3986
  }
3985
3987
  this._config.domain = d.includes('d');
3986
3988
  this._config.asymptotes = d.includes('a');
@@ -3992,15 +3994,14 @@ class Study {
3992
3994
  this._config = config;
3993
3995
  }
3994
3996
  }
3995
- this._name = this._config?.name ?? 'f';
3996
3997
  this.makeStudy();
3997
3998
  return this;
3998
3999
  }
3999
4000
  get name() {
4000
- return this._name;
4001
+ return this._config.name;
4001
4002
  }
4002
4003
  set name(value) {
4003
- this._name = value;
4004
+ this._config.name = value;
4004
4005
  }
4005
4006
  get config() {
4006
4007
  return this._config;