math-exercises 2.2.69 → 2.2.71

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 (213) hide show
  1. package/lib/exercises/math/calcul/arithmetics/divisorsList.d.ts.map +1 -1
  2. package/lib/exercises/math/calcul/arithmetics/divisorsList.js +2 -1
  3. package/lib/exercises/math/calcul/arithmetics/primeNumbers.d.ts.map +1 -1
  4. package/lib/exercises/math/calcul/arithmetics/primeNumbers.js +2 -1
  5. package/lib/exercises/math/calcul/fractions/fractionsOperations.d.ts.map +1 -1
  6. package/lib/exercises/math/calcul/fractions/fractionsOperations.js +6 -1
  7. package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivitySubstract.d.ts +12 -0
  8. package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivitySubstract.d.ts.map +1 -0
  9. package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivitySubstract.js +128 -0
  10. package/lib/exercises/math/calculLitteral/distributivity/index.d.ts +1 -0
  11. package/lib/exercises/math/calculLitteral/distributivity/index.d.ts.map +1 -1
  12. package/lib/exercises/math/calculLitteral/distributivity/index.js +1 -0
  13. package/lib/exercises/math/calculLitteral/equation/equationType1Exercise.d.ts.map +1 -1
  14. package/lib/exercises/math/calculLitteral/equation/equationType1Exercise.js +3 -6
  15. package/lib/exercises/math/calculLitteral/equation/equationType2Exercise.d.ts.map +1 -1
  16. package/lib/exercises/math/calculLitteral/equation/equationType2Exercise.js +3 -8
  17. package/lib/exercises/math/calculLitteral/equation/equationType3Exercise.d.ts.map +1 -1
  18. package/lib/exercises/math/calculLitteral/equation/equationType3Exercise.js +7 -9
  19. package/lib/exercises/math/calculLitteral/equation/equationType4Exercise.d.ts.map +1 -1
  20. package/lib/exercises/math/calculLitteral/equation/equationType4Exercise.js +6 -19
  21. package/lib/exercises/math/calculLitteral/factorisation/factoByX.d.ts +8 -0
  22. package/lib/exercises/math/calculLitteral/factorisation/factoByX.d.ts.map +1 -0
  23. package/lib/exercises/math/calculLitteral/factorisation/factoByX.js +146 -0
  24. package/lib/exercises/math/calculLitteral/factorisation/index.d.ts +1 -0
  25. package/lib/exercises/math/calculLitteral/factorisation/index.d.ts.map +1 -1
  26. package/lib/exercises/math/calculLitteral/factorisation/index.js +1 -0
  27. package/lib/exercises/math/functions/absolute/absolueValueAffineEquation.d.ts.map +1 -1
  28. package/lib/exercises/math/functions/absolute/absolueValueAffineEquation.js +2 -5
  29. package/lib/exercises/math/functions/trinoms/coefficientsIdentification.js +3 -3
  30. package/lib/exercises/math/functions/trinoms/findSecondRoot.d.ts +2 -2
  31. package/lib/exercises/math/functions/trinoms/findSecondRoot.d.ts.map +1 -1
  32. package/lib/exercises/math/functions/trinoms/findSecondRoot.js +5 -5
  33. package/lib/exercises/math/functions/trinoms/rootsProduct.d.ts +2 -2
  34. package/lib/exercises/math/functions/trinoms/rootsProduct.d.ts.map +1 -1
  35. package/lib/exercises/math/functions/trinoms/rootsProduct.js +6 -6
  36. package/lib/exercises/math/functions/trinoms/rootsSum.d.ts +2 -2
  37. package/lib/exercises/math/functions/trinoms/rootsSum.d.ts.map +1 -1
  38. package/lib/exercises/math/functions/trinoms/rootsSum.js +7 -7
  39. package/lib/exercises/math/functions/trinoms/trinomSignFromRoots.js +6 -6
  40. package/lib/exercises/math/geometry/angles/index.d.ts +2 -0
  41. package/lib/exercises/math/geometry/angles/index.d.ts.map +1 -0
  42. package/lib/exercises/math/geometry/angles/index.js +17 -0
  43. package/lib/exercises/math/geometry/angles/recognizeAngleType.d.ts +11 -0
  44. package/lib/exercises/math/geometry/angles/recognizeAngleType.d.ts.map +1 -0
  45. package/lib/exercises/math/geometry/angles/recognizeAngleType.js +272 -0
  46. package/lib/exercises/math/geometry/areas/rightTriangleArea.d.ts +3 -1
  47. package/lib/exercises/math/geometry/areas/rightTriangleArea.d.ts.map +1 -1
  48. package/lib/exercises/math/geometry/areas/rightTriangleArea.js +10 -22
  49. package/lib/exercises/math/geometry/areas/triangleArea.d.ts +6 -1
  50. package/lib/exercises/math/geometry/areas/triangleArea.d.ts.map +1 -1
  51. package/lib/exercises/math/geometry/areas/triangleArea.js +34 -48
  52. package/lib/exercises/math/geometry/euclidianConstructions/pointImageFromTranslation.js +1 -1
  53. package/lib/exercises/math/geometry/index.d.ts +2 -0
  54. package/lib/exercises/math/geometry/index.d.ts.map +1 -1
  55. package/lib/exercises/math/geometry/index.js +2 -0
  56. package/lib/exercises/math/geometry/pythagore/isTriangleRight.d.ts.map +1 -1
  57. package/lib/exercises/math/geometry/pythagore/pythagore.d.ts +0 -3
  58. package/lib/exercises/math/geometry/pythagore/pythagore.d.ts.map +1 -1
  59. package/lib/exercises/math/geometry/pythagore/pythagore.js +19 -25
  60. package/lib/exercises/math/geometry/pythagore/pythagoreCalcul.d.ts +1 -2
  61. package/lib/exercises/math/geometry/pythagore/pythagoreCalcul.d.ts.map +1 -1
  62. package/lib/exercises/math/geometry/pythagore/pythagoreCalcul.js +30 -65
  63. package/lib/exercises/math/geometry/quadrilaterals/index.d.ts +2 -0
  64. package/lib/exercises/math/geometry/quadrilaterals/index.d.ts.map +1 -0
  65. package/lib/exercises/math/geometry/quadrilaterals/index.js +17 -0
  66. package/lib/exercises/math/geometry/quadrilaterals/quadrilateralRecognition.d.ts +14 -0
  67. package/lib/exercises/math/geometry/quadrilaterals/quadrilateralRecognition.d.ts.map +1 -0
  68. package/lib/exercises/math/geometry/quadrilaterals/quadrilateralRecognition.js +221 -0
  69. package/lib/exercises/math/geometry/thales/index.d.ts.map +1 -1
  70. package/lib/exercises/math/geometry/thales/index.js +0 -1
  71. package/lib/exercises/math/geometry/thales/thales.js +2 -2
  72. package/lib/exercises/math/geometry/thales/thalesCalcul.d.ts +3 -4
  73. package/lib/exercises/math/geometry/thales/thalesCalcul.d.ts.map +1 -1
  74. package/lib/exercises/math/geometry/thales/thalesCalcul.js +69 -78
  75. package/lib/exercises/math/geometry/volumes/parallelepipedVolume.js +3 -3
  76. package/lib/exercises/math/geometry/volumes/sphereVolume.js +1 -1
  77. package/lib/exercises/math/trigonometry/trigonometry.d.ts +2 -3
  78. package/lib/exercises/math/trigonometry/trigonometry.d.ts.map +1 -1
  79. package/lib/exercises/math/trigonometry/trigonometry.js +32 -31
  80. package/lib/exercises/math/trigonometry/trigonometryAngleCalcul.d.ts +3 -2
  81. package/lib/exercises/math/trigonometry/trigonometryAngleCalcul.d.ts.map +1 -1
  82. package/lib/exercises/math/trigonometry/trigonometryAngleCalcul.js +18 -28
  83. package/lib/exercises/math/trigonometry/trigonometrySideCalcul.d.ts +5 -4
  84. package/lib/exercises/math/trigonometry/trigonometrySideCalcul.d.ts.map +1 -1
  85. package/lib/exercises/math/trigonometry/trigonometrySideCalcul.js +60 -56
  86. package/lib/exercises/pc/index.d.ts +0 -4
  87. package/lib/exercises/pc/index.d.ts.map +1 -1
  88. package/lib/exercises/pc/index.js +6 -4
  89. package/lib/exercises/utils/geogebra/toGGBCommandsProps.d.ts +1 -0
  90. package/lib/exercises/utils/geogebra/toGGBCommandsProps.d.ts.map +1 -1
  91. package/lib/exercises/vea/equationVEA.d.ts +2 -0
  92. package/lib/exercises/vea/equationVEA.d.ts.map +1 -0
  93. package/lib/exercises/vea/equationVEA.js +24 -0
  94. package/lib/exercises/vea/rationalVEA.d.ts.map +1 -1
  95. package/lib/exercises/vea/sqrtVEA.d.ts +6 -0
  96. package/lib/exercises/vea/sqrtVEA.d.ts.map +1 -0
  97. package/lib/exercises/vea/sqrtVEA.js +30 -0
  98. package/lib/geogebra/geogebraConstructor.d.ts +2 -0
  99. package/lib/geogebra/geogebraConstructor.d.ts.map +1 -1
  100. package/lib/geogebra/geogebraConstructor.js +7 -0
  101. package/lib/index.d.ts +39 -46
  102. package/lib/index.d.ts.map +1 -1
  103. package/lib/math/complex/complex.d.ts +1 -1
  104. package/lib/math/geometry/angle.d.ts +47 -0
  105. package/lib/math/geometry/angle.d.ts.map +1 -0
  106. package/lib/math/geometry/angle.js +210 -0
  107. package/lib/math/geometry/line.d.ts +7 -1
  108. package/lib/math/geometry/line.d.ts.map +1 -1
  109. package/lib/math/geometry/line.js +33 -0
  110. package/lib/math/geometry/parallelogram.d.ts +23 -0
  111. package/lib/math/geometry/parallelogram.d.ts.map +1 -0
  112. package/lib/math/geometry/parallelogram.js +70 -0
  113. package/lib/math/geometry/point.d.ts +4 -0
  114. package/lib/math/geometry/point.d.ts.map +1 -1
  115. package/lib/math/geometry/point.js +20 -0
  116. package/lib/math/geometry/quadrilateral.d.ts +15 -0
  117. package/lib/math/geometry/quadrilateral.d.ts.map +1 -0
  118. package/lib/math/geometry/quadrilateral.js +38 -0
  119. package/lib/math/geometry/rectangle.d.ts +24 -0
  120. package/lib/math/geometry/rectangle.d.ts.map +1 -0
  121. package/lib/math/geometry/rectangle.js +64 -0
  122. package/lib/math/geometry/rhombus.d.ts +19 -0
  123. package/lib/math/geometry/rhombus.d.ts.map +1 -0
  124. package/lib/math/geometry/rhombus.js +46 -0
  125. package/lib/math/geometry/rightTriangle.d.ts +31 -0
  126. package/lib/math/geometry/rightTriangle.d.ts.map +1 -0
  127. package/lib/math/geometry/rightTriangle.js +113 -0
  128. package/lib/math/geometry/segment.d.ts +24 -6
  129. package/lib/math/geometry/segment.d.ts.map +1 -1
  130. package/lib/math/geometry/segment.js +70 -4
  131. package/lib/math/geometry/square.d.ts +22 -0
  132. package/lib/math/geometry/square.d.ts.map +1 -0
  133. package/lib/math/geometry/square.js +43 -0
  134. package/lib/math/geometry/triangle.d.ts +45 -45
  135. package/lib/math/geometry/triangle.d.ts.map +1 -1
  136. package/lib/math/geometry/triangle.js +159 -186
  137. package/lib/math/geometry/vector.d.ts +5 -2
  138. package/lib/math/geometry/vector.d.ts.map +1 -1
  139. package/lib/math/geometry/vector.js +27 -9
  140. package/lib/math/numbers/rationals/rational.d.ts +1 -1
  141. package/lib/math/numbers/reals/extendedRingElement.d.ts +1 -1
  142. package/lib/math/numbers/reals/real.d.ts.map +1 -1
  143. package/lib/math/numbers/reals/real.js +3 -0
  144. package/lib/math/polynomials/generalAffine.d.ts +3 -0
  145. package/lib/math/polynomials/generalAffine.d.ts.map +1 -1
  146. package/lib/math/polynomials/generalAffine.js +5 -1
  147. package/lib/math/polynomials/polynomial.d.ts +1 -1
  148. package/lib/math/polynomials/trinom.d.ts +2 -2
  149. package/lib/math/utils/geometry/pythagoricianTriplets.d.ts +1 -0
  150. package/lib/math/utils/geometry/pythagoricianTriplets.d.ts.map +1 -1
  151. package/lib/math/utils/geometry/pythagoricianTriplets.js +14 -1
  152. package/lib/math/utils/random/randfloat.d.ts +1 -1
  153. package/lib/math/utils/random/randfloat.d.ts.map +1 -1
  154. package/lib/math/utils/random/randfloat.js +8 -1
  155. package/lib/math/utils/random/randint.d.ts +8 -1
  156. package/lib/math/utils/random/randint.d.ts.map +1 -1
  157. package/lib/math/utils/random/randint.js +6 -1
  158. package/lib/playground.d.ts.map +1 -1
  159. package/lib/playground.js +1 -8
  160. package/lib/tree/nodes/functions/absNode.d.ts +1 -1
  161. package/lib/tree/nodes/functions/functionNode.d.ts +2 -2
  162. package/lib/tree/nodes/functions/functionNode.d.ts.map +1 -1
  163. package/lib/tree/nodes/functions/oppositeNode.d.ts +5 -5
  164. package/lib/tree/nodes/functions/oppositeNode.d.ts.map +1 -1
  165. package/lib/tree/nodes/node.d.ts +6 -2
  166. package/lib/tree/nodes/node.d.ts.map +1 -1
  167. package/lib/tree/nodes/node.js +3 -0
  168. package/lib/tree/nodes/nodeConstructor.d.ts.map +1 -1
  169. package/lib/tree/nodes/nodeConstructor.js +8 -0
  170. package/lib/tree/nodes/numbers/numberNode.d.ts +2 -0
  171. package/lib/tree/nodes/numbers/numberNode.d.ts.map +1 -1
  172. package/lib/tree/nodes/numbers/numberNode.js +6 -1
  173. package/lib/tree/nodes/operators/addNode.d.ts.map +1 -1
  174. package/lib/tree/nodes/operators/addNode.js +123 -89
  175. package/lib/tree/nodes/operators/multiplyNode.d.ts.map +1 -1
  176. package/lib/tree/nodes/operators/multiplyNode.js +3 -3
  177. package/lib/tree/nodes/polynomials/monomNode.d.ts +47 -0
  178. package/lib/tree/nodes/polynomials/monomNode.d.ts.map +1 -0
  179. package/lib/tree/nodes/polynomials/monomNode.js +214 -0
  180. package/lib/tree/nodes/polynomials/trinomNode.d.ts +70 -0
  181. package/lib/tree/nodes/polynomials/trinomNode.d.ts.map +1 -0
  182. package/lib/tree/nodes/polynomials/trinomNode.js +156 -0
  183. package/lib/tree/nodes/variables/variableNode.d.ts.map +1 -1
  184. package/lib/tree/nodes/variables/variableNode.js +1 -1
  185. package/lib/tree/parsers/affineParser.d.ts.map +1 -1
  186. package/lib/tree/parsers/affineParser.js +2 -1
  187. package/lib/tree/parsers/discreteSetParser.d.ts +3 -0
  188. package/lib/tree/parsers/discreteSetParser.d.ts.map +1 -0
  189. package/lib/tree/parsers/discreteSetParser.js +23 -0
  190. package/lib/tree/parsers/equationSolutionParser.d.ts +1 -1
  191. package/lib/tree/parsers/equationSolutionParser.d.ts.map +1 -1
  192. package/lib/tree/parsers/equationSolutionParser.js +15 -4
  193. package/lib/tree/parsers/latexParser.d.ts +5 -1
  194. package/lib/tree/parsers/latexParser.d.ts.map +1 -1
  195. package/lib/tree/parsers/latexParser.js +17 -3
  196. package/lib/tree/parsers/monomParser.d.ts +2 -2
  197. package/lib/tree/parsers/monomParser.d.ts.map +1 -1
  198. package/lib/tree/parsers/monomParser.js +61 -8
  199. package/lib/tree/parsers/rationalParser.d.ts +1 -1
  200. package/lib/tree/parsers/rationalParser.d.ts.map +1 -1
  201. package/lib/tree/parsers/rationalParser.js +28 -24
  202. package/lib/tree/parsers/sqrtParser.d.ts +9 -0
  203. package/lib/tree/parsers/sqrtParser.d.ts.map +1 -0
  204. package/lib/tree/parsers/sqrtParser.js +52 -0
  205. package/lib/tree/parsers/trinomParser.d.ts +1 -1
  206. package/lib/tree/parsers/trinomParser.d.ts.map +1 -1
  207. package/lib/tree/parsers/trinomParser.js +14 -2
  208. package/lib/tree/utilities/functionComposition.d.ts +1 -1
  209. package/lib/tree/utilities/functionComposition.d.ts.map +1 -1
  210. package/lib/utils/arrays/rotation.d.ts +8 -0
  211. package/lib/utils/arrays/rotation.d.ts.map +1 -0
  212. package/lib/utils/arrays/rotation.js +17 -0
  213. package/package.json +1 -1
@@ -4,51 +4,41 @@ exports.trigonometryAngleCalcul = void 0;
4
4
  const exercise_1 = require("../../../exercises/exercise");
5
5
  const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
6
6
  const geogebraConstructor_1 = require("../../../geogebra/geogebraConstructor");
7
- const triangle_1 = require("../../../math/geometry/triangle");
7
+ const rightTriangle_1 = require("../../../math/geometry/rightTriangle");
8
8
  const randint_1 = require("../../../math/utils/random/randint");
9
9
  const round_1 = require("../../../math/utils/round");
10
10
  const shuffle_1 = require("../../../utils/alea/shuffle");
11
11
  const getTrigonometryAngleCalcul = () => {
12
- const vertices = [];
13
- const code = 65 + (0, randint_1.randint)(0, 24); // Générer un code de caractère majuscule aléatoire (A-Z)
14
- for (let i = 0; i < 3; i++)
15
- vertices.push(String.fromCharCode(code + i));
16
- const triangle = triangle_1.TriangleConstructor.createRandomRightTriangle({
17
- minRapport: 0.5,
18
- maxRapport: 1.5,
19
- names: vertices,
12
+ const triangle = rightTriangle_1.RightTriangleConstructor.randomNiceSides({
13
+ randomName: true,
20
14
  });
21
- const sides = [
22
- triangle.getSideCName(),
23
- triangle.getSideBName(),
24
- triangle.getSideAName(),
25
- ];
26
- const sideLengths = [
27
- triangle.getSideCnumber(),
28
- triangle.getSideBnumber(),
29
- triangle.getSideAnumber(),
30
- ].map((el) => (0, round_1.round)(el / 2, 2));
31
- const angle = [triangle.vertexB.name, triangle.vertexC.name];
32
- const randAngle = (0, randint_1.randint)(0, 2);
33
- const randSides = (0, shuffle_1.shuffle)([0, 1, 2]);
34
- const answer = randAngle === 0
35
- ? Math.round((Math.acos(sideLengths[0] / sideLengths[2]) * 180) / Math.PI)
36
- : Math.round((Math.acos(sideLengths[1] / sideLengths[2]) * 180) / Math.PI);
15
+ const randAngle = (0, randint_1.randint)(1, 3);
16
+ const hiddenSide = (0, randint_1.randint)(0, 3);
17
+ const givenSides = triangle.sides.filter((s, i) => i !== hiddenSide);
18
+ triangle.showSidesLength([hiddenSide]);
19
+ triangle.highlightAngle(randAngle, { color: "red" });
20
+ const answer = (0, round_1.round)(triangle.angles[randAngle].evaluate(), 0);
37
21
  const answerTex = answer + "^{\\circ}";
38
22
  const ggb = new geogebraConstructor_1.GeogebraConstructor({
39
- commands: triangle.generateCommands({ highlightedAngle: angle[randAngle] }),
23
+ commands: triangle.commands,
40
24
  hideAxes: true,
41
25
  hideGrid: true,
42
26
  });
43
27
  const question = {
44
- instruction: `Le triangle $${triangle.getTriangleName()}$ rectangle en $${triangle.getRightAngle()}$ est tel que $${sides[randSides[0]]} = ${(sideLengths[randSides[0]] + "").replace(".", ",")}$ cm et $${sides[randSides[1]]} = ${(sideLengths[randSides[1]] + "").replace(".", ",")}$ cm. Calculer $\\widehat{${angle[randAngle]}}$ à $1^\\circ$ près.`,
28
+ instruction: `Le triangle $${triangle.name}$ rectangle en $${triangle.points[0].name}$ est tel que $${givenSides[0].toLengthTex()}$ cm et $${givenSides[1].toLengthTex()}$ cm.
29
+
30
+ Calculer $\\widehat{${triangle.points[randAngle].name}}$ à $1^\\circ$ près.`,
45
31
  answer: answerTex,
46
32
  keys: ["degree"],
47
33
  ggbOptions: ggb.getOptions({
48
34
  coords: triangle.generateCoords(),
49
35
  }),
50
36
  answerFormat: "tex",
51
- identifiers: { randAngle, sideLengths, randSides },
37
+ identifiers: {
38
+ randAngle,
39
+ hiddenSide,
40
+ triangleIdentifiers: triangle.toIdentifiers(),
41
+ },
52
42
  };
53
43
  return question;
54
44
  };
@@ -1,9 +1,10 @@
1
1
  import { Exercise } from "../../../exercises/exercise";
2
+ import { TriangleIdentifiers } from "../../../math/geometry/triangle";
2
3
  type Identifiers = {
3
- sideLengths: number[];
4
- randAngle: number;
5
- randSide: number;
6
- randSideQuestion: number;
4
+ sideAsked: number;
5
+ givenSide: number;
6
+ givenAngle: number;
7
+ triangleIdentifiers: TriangleIdentifiers;
7
8
  };
8
9
  export declare const trigonometrySideCalcul: Exercise<Identifiers>;
9
10
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"trigonometrySideCalcul.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/trigonometry/trigonometrySideCalcul.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,MAAM,CAAC;CAC1B,CAAC;AAwMF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAgBxD,CAAC"}
1
+ {"version":3,"file":"trigonometrySideCalcul.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/trigonometry/trigonometrySideCalcul.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAQlC,OAAO,EAEL,mBAAmB,EACpB,MAAM,8BAA8B,CAAC;AAMtC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,mBAAmB,EAAE,mBAAmB,CAAC;CAC1C,CAAC;AA4KF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAexD,CAAC"}
@@ -3,66 +3,50 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.trigonometrySideCalcul = void 0;
4
4
  const exercise_1 = require("../../../exercises/exercise");
5
5
  const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
6
+ const colors_1 = require("../../../geogebra/colors");
6
7
  const geogebraConstructor_1 = require("../../../geogebra/geogebraConstructor");
7
- const triangle_1 = require("../../../math/geometry/triangle");
8
+ const rightTriangle_1 = require("../../../math/geometry/rightTriangle");
8
9
  const randint_1 = require("../../../math/utils/random/randint");
9
10
  const round_1 = require("../../../math/utils/round");
10
11
  const numberNode_1 = require("../../../tree/nodes/numbers/numberNode");
11
12
  const shuffle_1 = require("../../../utils/alea/shuffle");
12
13
  const getTrigonometrySideCalcul = () => {
13
- const vertices = [];
14
- const code = 65 + (0, randint_1.randint)(0, 24); // Générer un code de caractère majuscule aléatoire (A-Z)
15
- for (let i = 0; i < 3; i++)
16
- vertices.push(String.fromCharCode(code + i));
17
- const triangle = triangle_1.TriangleConstructor.createRandomRightTriangle({
18
- minRapport: 0.5,
19
- maxRapport: 1.5,
20
- names: vertices,
14
+ const givenAngle = (0, randint_1.randint)(1, 3);
15
+ const givenSide = (0, randint_1.randint)(0, 3);
16
+ const sideAsked = (0, randint_1.randint)(0, 3, [givenSide]);
17
+ const triangle = rightTriangle_1.RightTriangleConstructor.randomNiceAngles({
18
+ randomName: true,
19
+ niceSideIndex: givenSide,
21
20
  });
22
- const sides = [
23
- triangle.getSideCName(),
24
- triangle.getSideBName(),
25
- triangle.getSideAName(),
26
- ];
27
- const sideLengths = [
28
- triangle.getSideCnumber(),
29
- triangle.getSideBnumber(),
30
- triangle.getSideAnumber(),
31
- ].map((el) => (0, round_1.round)(el / 2, 2));
32
- const angle = [triangle.vertexB.name, triangle.vertexC.name];
33
- const randAngle = (0, randint_1.randint)(0, 2);
34
- const randSide = (0, randint_1.randint)(0, 3); // valeurs possible : 0 1 2
35
- const randSideQuestion = (0, randint_1.randint)(0, 3, [randSide]); // si rand = 0, valeurs possible 1 2
36
- const angleValue = [
37
- (0, round_1.round)((Math.acos(sideLengths[0] / sideLengths[2]) * 180) / Math.PI, 1),
38
- (0, round_1.round)((Math.acos(sideLengths[1] / sideLengths[2]) * 180) / Math.PI, 1),
39
- ];
40
- const commands = [
41
- ...triangle.generateCommands({
42
- highlightedAngle: angle[randAngle],
43
- colorHighlightedAngle: "Black",
44
- showLabels: [sides[randSideQuestion]],
45
- setCaptions: ["?"],
46
- highlightedSide: sides[randSideQuestion],
47
- }),
48
- ];
21
+ triangle.showSidesLength([0, 1, 2].filter((i) => i !== givenSide));
22
+ triangle.highlightAngle(givenAngle, { color: colors_1.greenDark, showValue: true });
23
+ triangle.highlightSide(sideAsked, { color: "red", caption: "?" });
24
+ const angleValue = triangle.angles[givenAngle].evaluate().frenchify();
49
25
  const ggb = new geogebraConstructor_1.GeogebraConstructor({
50
- commands,
26
+ commands: triangle.commands,
51
27
  hideAxes: true,
52
28
  hideGrid: true,
53
29
  });
54
- const answer = `${((0, round_1.round)(sideLengths[randSideQuestion], 1) + "").replace(".", ",")}`;
30
+ const answer = (0, round_1.round)(triangle.sides[sideAsked].getLength(), 1).frenchify();
31
+ const identifiers = {
32
+ givenAngle,
33
+ givenSide,
34
+ sideAsked,
35
+ triangleIdentifiers: triangle.toIdentifiers(),
36
+ };
55
37
  const question = {
56
- instruction: `Le triangle $${triangle.getTriangleName()}$ rectangle en $${triangle.getRightAngle()}$ est tel que $${sides[randSide]} = ${(sideLengths[randSide] + "").replace(".", ",")}$ cm et $\\widehat{${angle[randAngle]}} = ${(angleValue[randAngle] + "").replace(".", ",")}^\\circ$. Calculer $${sides[randSideQuestion]}$ à $0,1$ cm près.`,
38
+ instruction: `Le triangle $${triangle.name}$ rectangle en $${triangle.points[0].name}$ est tel que $${triangle.sides[givenSide].toLengthTex()}$ cm et $\\widehat{${triangle.points[givenAngle].name}} = ${angleValue}^\\circ$.
39
+
40
+ Calculer $${triangle.sides[sideAsked].toInsideName()}$ à $0,1$ cm près.`,
57
41
  answer,
58
- hint: getHint(),
59
- correction: getCorrection(sides, sideLengths, randSideQuestion, randSide, angle[randAngle], angleValue[randAngle], answer),
42
+ // hint: getHint(identifiers),
43
+ // correction: getCorrection(identifiers),
60
44
  keys: [],
61
45
  ggbOptions: ggb.getOptions({
62
46
  coords: triangle.generateCoords(),
63
47
  }),
64
48
  answerFormat: "tex",
65
- identifiers: { randAngle, randSide, randSideQuestion, sideLengths },
49
+ identifiers,
66
50
  };
67
51
  return question;
68
52
  };
@@ -74,21 +58,42 @@ const getPropositions = (n, { answer }) => {
74
58
  }
75
59
  return (0, shuffle_1.shuffle)(propositions);
76
60
  };
77
- const getHint = () => {
61
+ const getHint = (identifiers) => {
78
62
  return `Identifier le côté opposé, le côté adjacent et l'hypoténuse, puis utiliser la bonne formule de trigonométrie.`;
79
63
  };
80
- const getCorrection = (sides, sideLengths, randSideQuestion, randSide, angle, angleValue, answer) => {
81
- const hypothenus = { name: sides[2], length: sideLengths[2] };
82
- const sidesWithLentgh = sides.map((value, index) => {
83
- return { name: value, length: sideLengths[index] };
84
- });
85
- const adjacent = sidesWithLentgh.filter((value) => value.name !== hypothenus.name &&
86
- [value.name.charAt(0), value.name.charAt(1)].includes(angle))[0];
87
- const opposite = sidesWithLentgh.filter((value) => value.name !== hypothenus.name && value.name !== adjacent.name)[0];
88
- const correctEquations = getCorrectEquations({ name: sides[randSideQuestion], length: sideLengths[randSideQuestion] }, { name: sides[randSide], length: sideLengths[randSide] }, hypothenus, { name: angle, value: angleValue }, adjacent, opposite, answer);
89
- return `On utilise la relation $${correctEquations[0]}$, on a donc :
90
- $${correctEquations[1]}$, donc $${correctEquations[2]}$. Ainsi $${correctEquations[3]}$ `;
91
- };
64
+ // const getCorrection: GetCorrection<Identifiers> = (identifiers) => {
65
+ // const hypothenus = { name: sides[2], length: sideLengths[2] };
66
+ // const sidesWithLentgh = sides.map((value, index) => {
67
+ // return { name: value, length: sideLengths[index] };
68
+ // });
69
+ // const adjacent = sidesWithLentgh.filter(
70
+ // (value) =>
71
+ // value.name !== hypothenus.name &&
72
+ // [value.name.charAt(0), value.name.charAt(1)].includes(angle),
73
+ // )[0];
74
+ // const opposite = sidesWithLentgh.filter(
75
+ // (value) => value.name !== hypothenus.name && value.name !== adjacent.name,
76
+ // )[0];
77
+ // const correctEquations = getCorrectEquations(
78
+ // { name: sides[randSideQuestion], length: sideLengths[randSideQuestion] },
79
+ // { name: sides[randSide], length: sideLengths[randSide] },
80
+ // hypothenus,
81
+ // { name: angle, value: angleValue },
82
+ // adjacent,
83
+ // opposite,
84
+ // answer,
85
+ // );
86
+ // return `On utilise la relation :
87
+ // $$
88
+ // ${correctEquations[0]}
89
+ // $$
90
+ // On a donc :
91
+ // $$
92
+ // ${correctEquations[1]}
93
+ // $$
94
+ // donc
95
+ // $$${correctEquations[2]}$$. Ainsi $${correctEquations[3]}$ `;
96
+ // };
92
97
  const getCorrectEquations = (randSideQuestion, randSide, hypothenus, angle, adjacent, opposite, answer) => {
93
98
  let result;
94
99
  switch (randSideQuestion.name) {
@@ -157,5 +162,4 @@ exports.trigonometrySideCalcul = {
157
162
  isAnswerValid,
158
163
  hasGeogebra: true,
159
164
  subject: "Mathématiques",
160
- hasHintAndCorrection: true,
161
165
  };
@@ -47,8 +47,6 @@ export * from "../math/geometry/vectors/scalarProduct/scalarProductViaCoords";
47
47
  export * from "../math/geometry/vectors/scalarProduct/scalarProductViaCos";
48
48
  export * from "../math/geometry/vectors/coordinatesReading";
49
49
  export * from "../math/functions/affines/affineExpressionReading";
50
- export * from "../math/geometry/thales/thales";
51
- export * from "../math/geometry/thales/thalesCalcul";
52
50
  export * from "../math/equaDiff/equaDiffCheckSolutionFirstOrder";
53
51
  export * from "../math/equaDiff/equaDiffGeneralForme";
54
52
  export * from "../math/equaDiff/equaDiffGeneralFormeWithIC";
@@ -57,6 +55,4 @@ export * from "../math/derivation/derivative/usualderivative";
57
55
  export { thirdDegreeDerivative } from "../math/derivation/derivative/thirdDegreeDerivative";
58
56
  export { firstDegreeDerivative } from "../math/derivation/derivative/firstDegreeDerivative";
59
57
  export { secondDegreeDerivative } from "../math/derivation/derivative/secondDegreeDerivative";
60
- export * from "../math/trigonometry/trigonometrySideCalcul";
61
- export * from "../math/trigonometry/trigonometryAngleCalcul";
62
58
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1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ors/scalarProduct/scalarProductViaCos"), exports);
69
69
  __exportStar(require("../math/geometry/vectors/coordinatesReading"), exports);
70
70
  __exportStar(require("../math/functions/affines/affineExpressionReading"), exports);
71
- __exportStar(require("../math/geometry/thales/thales"), exports);
72
- __exportStar(require("../math/geometry/thales/thalesCalcul"), exports);
71
+ //!FIX TRIANGLE
72
+ // export * from "../math/geometry/thales/thales";
73
+ // export * from "../math/geometry/thales/thalesCalcul";
73
74
  __exportStar(require("../math/equaDiff/equaDiffCheckSolutionFirstOrder"), exports);
74
75
  __exportStar(require("../math/equaDiff/equaDiffGeneralForme"), exports);
75
76
  __exportStar(require("../math/equaDiff/equaDiffGeneralFormeWithIC"), exports);
@@ -81,5 +82,6 @@ var firstDegreeDerivative_1 = require("../math/derivation/derivative/firstDegree
81
82
  Object.defineProperty(exports, "firstDegreeDerivative", { enumerable: true, get: function () { return firstDegreeDerivative_1.firstDegreeDerivative; } });
82
83
  var secondDegreeDerivative_1 = require("../math/derivation/derivative/secondDegreeDerivative");
83
84
  Object.defineProperty(exports, "secondDegreeDerivative", { enumerable: true, get: function () { return secondDegreeDerivative_1.secondDegreeDerivative; } });
84
- __exportStar(require("../math/trigonometry/trigonometrySideCalcul"), exports);
85
- __exportStar(require("../math/trigonometry/trigonometryAngleCalcul"), exports);
85
+ // export * from "../math/trigonometry/trigonometrySideCalcul";
86
+ // export * from "../math/trigonometry/trigonometryAngleCalcul";
87
+ //!FIX TRIANGLE
@@ -5,5 +5,6 @@ export type ToGGBCommandsProps = {
5
5
  style?: number;
6
6
  size?: number;
7
7
  color?: string;
8
+ showLength?: boolean;
8
9
  };
9
10
  //# sourceMappingURL=toGGBCommandsProps.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"toGGBCommandsProps.d.ts","sourceRoot":"","sources":["../../../../src/exercises/utils/geogebra/toGGBCommandsProps.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC"}
1
+ {"version":3,"file":"toGGBCommandsProps.d.ts","sourceRoot":"","sources":["../../../../src/exercises/utils/geogebra/toGGBCommandsProps.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const equationVEA: (ans: string, solutionTex: string) => boolean;
2
+ //# sourceMappingURL=equationVEA.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"equationVEA.d.ts","sourceRoot":"","sources":["../../../src/exercises/vea/equationVEA.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,WAAW,QAAS,MAAM,eAAe,MAAM,YAa3D,CAAC"}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.equationVEA = void 0;
4
+ const discreteSetParser_1 = require("../../tree/parsers/discreteSetParser");
5
+ const equationSolutionParser_1 = require("../../tree/parsers/equationSolutionParser");
6
+ const rationalVEA_1 = require("./rationalVEA");
7
+ const equationVEA = (ans, solutionTex) => {
8
+ try {
9
+ let parsed = (0, equationSolutionParser_1.equationSolutionParser)(ans);
10
+ if (parsed) {
11
+ return (0, rationalVEA_1.rationalVEA)(parsed.toTex(), solutionTex);
12
+ }
13
+ else {
14
+ const setParsed = (0, discreteSetParser_1.discreteSetParser)(ans);
15
+ if (!setParsed || setParsed.length !== 1)
16
+ return false;
17
+ return (0, rationalVEA_1.rationalVEA)(setParsed[0].toTex(), solutionTex);
18
+ }
19
+ }
20
+ catch (err) {
21
+ return false;
22
+ }
23
+ };
24
+ exports.equationVEA = equationVEA;
@@ -1 +1 @@
1
- {"version":3,"file":"rationalVEA.d.ts","sourceRoot":"","sources":["../../../src/exercises/vea/rationalVEA.ts"],"names":[],"mappings":"AAKA,KAAK,IAAI,GAAG;IACV,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AACF,eAAO,MAAM,WAAW,eACV,MAAM,UACV,MAAM,6DAC4C,IAAI,YAqC/D,CAAC"}
1
+ {"version":3,"file":"rationalVEA.d.ts","sourceRoot":"","sources":["../../../src/exercises/vea/rationalVEA.ts"],"names":[],"mappings":"AAKA,KAAK,IAAI,GAAG;IACV,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AACF,eAAO,MAAM,WAAW,eACV,MAAM,UACV,MAAM,6DAC4C,IAAI,YAoC/D,CAAC"}
@@ -0,0 +1,6 @@
1
+ type Opts = {
2
+ allowNonIrreductible?: boolean;
3
+ };
4
+ export declare const sqrtVEA: (studentAns: string, answer: string, { allowNonIrreductible }?: Opts) => boolean;
5
+ export {};
6
+ //# sourceMappingURL=sqrtVEA.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sqrtVEA.d.ts","sourceRoot":"","sources":["../../../src/exercises/vea/sqrtVEA.ts"],"names":[],"mappings":"AAMA,KAAK,IAAI,GAAG;IACV,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC,CAAC;AACF,eAAO,MAAM,OAAO,eACN,MAAM,UACV,MAAM,6BACY,IAAI,YAmB/B,CAAC"}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sqrtVEA = void 0;
4
+ const numberNode_1 = require("../../tree/nodes/numbers/numberNode");
5
+ const latexParser_1 = require("../../tree/parsers/latexParser");
6
+ const sqrtParser_1 = require("../../tree/parsers/sqrtParser");
7
+ const sqrtVEA = (studentAns, answer, { allowNonIrreductible } = {
8
+ allowNonIrreductible: true,
9
+ }) => {
10
+ try {
11
+ allowNonIrreductible = allowNonIrreductible ?? true;
12
+ const parsed = (0, sqrtParser_1.sqrtParser)(studentAns);
13
+ if (!parsed)
14
+ return false;
15
+ const parsedAnswer = (0, latexParser_1.parseAlgebraic)(answer);
16
+ if ((0, numberNode_1.isNumberNode)(parsed)) {
17
+ return Math.abs(parsed.evaluate() - parsedAnswer.evaluate()) < 0.0000001;
18
+ }
19
+ else if (allowNonIrreductible) {
20
+ return Math.abs(parsed.evaluate() - parsedAnswer.evaluate()) < 0.0000001;
21
+ }
22
+ else {
23
+ return parsed.equals(parsedAnswer);
24
+ }
25
+ }
26
+ catch (err) {
27
+ return false;
28
+ }
29
+ };
30
+ exports.sqrtVEA = sqrtVEA;
@@ -1,4 +1,5 @@
1
1
  import { GeogebraAxisOptions, GeogebraOptions } from "../exercises/exercise";
2
+ import { Point } from "../math/geometry/point";
2
3
  type GetAdaptedCoords = {
3
4
  xMin: number;
4
5
  xMax: number;
@@ -25,6 +26,7 @@ export declare class GeogebraConstructor {
25
26
  xAxis?: GeogebraAxisOptions;
26
27
  yAxis?: GeogebraAxisOptions;
27
28
  constructor(options: Omit<GeogebraOptions, "coords">);
29
+ getCoordsForPoints(points: Point[]): number[];
28
30
  getAdaptedCoords({ xMin, xMax, yMin, yMax, zMin, zMax, forceShowAxes, }: GetAdaptedCoords): number[];
29
31
  getOptions({ coords }: GetOptionsProps): GeogebraOptions;
30
32
  }
@@ -1 +1 @@
1
- {"version":3,"file":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ACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,aAAa,GACd,EAAE,gBAAgB;IAyCnB,UAAU,CAAC,EAAE,MAAM,EAAE,EAAE,eAAe,GAAG,eAAe;CAiBzD"}
@@ -17,6 +17,13 @@ class GeogebraConstructor {
17
17
  this.xAxis = options?.xAxis;
18
18
  this.yAxis = options?.yAxis;
19
19
  }
20
+ getCoordsForPoints(points) {
21
+ const xMin = Math.min(...points.map((p) => p.x.evaluate()));
22
+ const xMax = Math.max(...points.map((p) => p.x.evaluate()));
23
+ const yMin = Math.min(...points.map((p) => p.y.evaluate()));
24
+ const yMax = Math.max(...points.map((p) => p.y.evaluate()));
25
+ return this.getAdaptedCoords({ xMin, xMax, yMin, yMax });
26
+ }
20
27
  getAdaptedCoords({ xMin, xMax, yMin, yMax, zMin, zMax, forceShowAxes, }) {
21
28
  const showAxes = forceShowAxes ?? (this.hideAxes ? false : true);
22
29
  const xDelta = xMax - xMin;
package/lib/index.d.ts CHANGED
@@ -230,6 +230,12 @@ declare const mathExercises: (Exercise<{
230
230
  a: number;
231
231
  b: number;
232
232
  c: number;
233
+ }, {}> | Exercise<{
234
+ type: number;
235
+ affine1: import("./math/polynomials/generalAffine").GeneralAffineIdentifiers;
236
+ affine2: import("./math/polynomials/generalAffine").GeneralAffineIdentifiers;
237
+ affine3: import("./math/polynomials/generalAffine").GeneralAffineIdentifiers;
238
+ affine4?: import("./math/polynomials/generalAffine").GeneralAffineIdentifiers | undefined;
233
239
  }, {}> | Exercise<{
234
240
  randNbr: number;
235
241
  }, {}> | Exercise<{
@@ -324,6 +330,9 @@ declare const mathExercises: (Exercise<{
324
330
  c: number;
325
331
  d: number;
326
332
  isSubstract: boolean;
333
+ }, {}> | Exercise<{
334
+ a: number;
335
+ b: number;
327
336
  }, {}> | Exercise<{
328
337
  b: number;
329
338
  c: number;
@@ -798,11 +807,11 @@ declare const mathExercises: (Exercise<{
798
807
  cIdentifiers: import("./tree/nodes/nodeConstructor").NodeIdentifiers;
799
808
  isAsking: string;
800
809
  }, {}> | Exercise<{
801
- trinomIdentifiers: import("./math/polynomials/generalTrinom").GeneralTrinomIdentifiers;
810
+ trinomIdentifiers: import("./tree/nodes/polynomials/trinomNode").TrinomNodeIdentifiers;
802
811
  }, {}> | Exercise<{
803
- trinomIdentifiers: import("./math/polynomials/generalTrinom").GeneralTrinomIdentifiers;
812
+ trinomIdentifiers: import("./tree/nodes/polynomials/trinomNode").TrinomNodeIdentifiers;
804
813
  }, {}> | Exercise<{
805
- trinomIdentifiers: import("./math/polynomials/generalTrinom").GeneralTrinomIdentifiers;
814
+ trinomIdentifiers: import("./tree/nodes/polynomials/trinomNode").TrinomNodeIdentifiers;
806
815
  firstRootIdentifiers: import("./tree/nodes/nodeConstructor").NodeIdentifiers;
807
816
  }, {}> | Exercise<{
808
817
  a: number;
@@ -893,10 +902,14 @@ declare const mathExercises: (Exercise<{
893
902
  length: number;
894
903
  width: number;
895
904
  }, {}> | Exercise<{
896
- sidesLengths: number[];
905
+ triangleIdentifiers: import("./math/geometry/triangle").TriangleIdentifiers;
897
906
  }, {}> | Exercise<{
898
907
  side: number;
899
- }, {}> | Exercise<{}, {}> | Exercise<{
908
+ }, {}> | Exercise<{
909
+ triangleIdentifiers: import("./math/geometry/triangle").TriangleIdentifiers;
910
+ height: number;
911
+ base: number;
912
+ }, {}> | Exercise<{
900
913
  randomSide: number;
901
914
  }, {}> | Exercise<{
902
915
  area: number;
@@ -982,13 +995,9 @@ declare const mathExercises: (Exercise<{
982
995
  }, {}> | Exercise<{
983
996
  perimeter: number;
984
997
  }, {}> | Exercise<{
985
- sideA: string;
986
- sideB: string;
987
- sideC: string;
988
998
  triangleIdentifiers: import("./math/geometry/triangle").TriangleIdentifiers;
989
999
  }, {}> | Exercise<{
990
- square: number;
991
- sideLengths: number[];
1000
+ sideAsked: number;
992
1001
  triangleIdentifiers: import("./math/geometry/triangle").TriangleIdentifiers;
993
1002
  }, {}> | Exercise<{
994
1003
  isRight: boolean;
@@ -1006,9 +1015,10 @@ declare const mathExercises: (Exercise<{
1006
1015
  yC: number;
1007
1016
  factor: number;
1008
1017
  }, {}> | Exercise<{
1018
+ ratio: number;
1009
1019
  triangleIdentifiers: import("./math/geometry/triangle").TriangleIdentifiers;
1010
- insidePointsIdentifiers: import("./math/geometry/point").PointIdentifiers[];
1011
- segmentAsked: import("./math/geometry/segment").SegmentIdentifiers;
1020
+ insidePointsNames: string[];
1021
+ segmentAskedName: string;
1012
1022
  isPapillon: boolean;
1013
1023
  }, {
1014
1024
  configurationType: string;
@@ -1166,6 +1176,16 @@ declare const mathExercises: (Exercise<{
1166
1176
  }, {}> | Exercise<{
1167
1177
  startPoint: number[];
1168
1178
  vector: number[];
1179
+ }, {}> | Exercise<{
1180
+ shape: string;
1181
+ showDiagonals: boolean;
1182
+ drawAngles: boolean;
1183
+ shapeIdentifiers: import("./math/geometry/parallelogram").ParallelogramIdentifiers | import("./math/geometry/rhombus").RhombusIdentifiers | import("./math/geometry/rectangle").RectangleIdentifiers | import("./math/geometry/square").SquareIdentifiers;
1184
+ }, {}> | Exercise<{
1185
+ points: import("./math/geometry/point").PointIdentifiers[];
1186
+ angleType: string;
1187
+ angleIndex: number;
1188
+ apexIndex: number;
1169
1189
  }, {}> | Exercise<{
1170
1190
  coeffs: number[];
1171
1191
  to: string;
@@ -1618,20 +1638,18 @@ declare const mathExercises: (Exercise<{
1618
1638
  mainValue: number;
1619
1639
  isCos: boolean;
1620
1640
  }, {}> | Exercise<{
1621
- sideA: string;
1622
- sideB: string;
1623
- sideC: string;
1624
1641
  randAngle: number;
1625
1642
  randTrigo: number;
1643
+ triangleIdentifiers: import("./math/geometry/triangle").TriangleIdentifiers;
1626
1644
  }, {}> | Exercise<{
1627
- sideLengths: number[];
1628
1645
  randAngle: number;
1629
- randSides: number[];
1646
+ hiddenSide: number;
1647
+ triangleIdentifiers: import("./math/geometry/triangle").TriangleIdentifiers;
1630
1648
  }, {}> | Exercise<{
1631
- sideLengths: number[];
1632
- randAngle: number;
1633
- randSide: number;
1634
- randSideQuestion: number;
1649
+ sideAsked: number;
1650
+ givenSide: number;
1651
+ givenAngle: number;
1652
+ triangleIdentifiers: import("./math/geometry/triangle").TriangleIdentifiers;
1635
1653
  }, {}> | Exercise<{
1636
1654
  angleValue: number;
1637
1655
  angleIdentifiers: import("./tree/nodes/nodeConstructor").NodeIdentifiers;
@@ -1782,22 +1800,6 @@ declare const pcExercises: (Exercise<{
1782
1800
  signs: number[];
1783
1801
  isLog10: boolean;
1784
1802
  }, {}> | Exercise<{
1785
- vertices: string[];
1786
- xA: number;
1787
- yA: number;
1788
- xB: number;
1789
- yB: number;
1790
- xC: number;
1791
- yC: number;
1792
- factor: number;
1793
- }, {}> | Exercise<{
1794
- triangleIdentifiers: import("./math/geometry/triangle").TriangleIdentifiers;
1795
- insidePointsIdentifiers: import("./math/geometry/point").PointIdentifiers[];
1796
- segmentAsked: import("./math/geometry/segment").SegmentIdentifiers;
1797
- isPapillon: boolean;
1798
- }, {
1799
- configurationType: string;
1800
- }> | Exercise<{
1801
1803
  xA: number;
1802
1804
  xB: number;
1803
1805
  yA: number;
@@ -1818,15 +1820,6 @@ declare const pcExercises: (Exercise<{
1818
1820
  a: number;
1819
1821
  b: number;
1820
1822
  c: number;
1821
- }, {}> | Exercise<{
1822
- sideLengths: number[];
1823
- randAngle: number;
1824
- randSides: number[];
1825
- }, {}> | Exercise<{
1826
- sideLengths: number[];
1827
- randAngle: number;
1828
- randSide: number;
1829
- randSideQuestion: number;
1830
1823
  }, {}> | Exercise<{
1831
1824
  reactionArray: import("./pc/constants/molecularChemistry/reaction").ReactionSpecies[];
1832
1825
  }, {}> | Exercise<{
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAG1D,OAAO,yBAAyB,CAAC;AAEjC,QAAA,MAAM,aAAa;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAA+B,CAAC;AACnD,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAA6B,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC"}
@@ -18,7 +18,7 @@ export declare class Complex {
18
18
  times(n: number): Complex;
19
19
  opposite(): Complex;
20
20
  conjugate(): Complex;
21
- toArgumentTree(): NumberNode | import("../../tree/nodes/numbers/constantNode").ConstantNode | OppositeNode | FractionNode | undefined;
21
+ toArgumentTree(): import("../../tree/nodes/numbers/constantNode").ConstantNode | NumberNode | FractionNode | OppositeNode<FractionNode> | undefined;
22
22
  toModuleTree(): import("../../tree/nodes/algebraicNode").AlgebraicNode;
23
23
  toTree(): ComplexNode;
24
24
  }