math-exercises 2.2.14 → 2.2.16

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 (176) hide show
  1. package/lib/exercises/exercise.d.ts +28 -32
  2. package/lib/exercises/exercise.d.ts.map +1 -1
  3. package/lib/exercises/math/calcul/arithmetics/commonDivisorsList.d.ts.map +1 -1
  4. package/lib/exercises/math/calcul/arithmetics/commonDivisorsList.js +9 -3
  5. package/lib/exercises/math/calcul/fractions/fractionAndIntegerDivision.d.ts.map +1 -1
  6. package/lib/exercises/math/calcul/fractions/fractionAndIntegerDivision.js +12 -8
  7. package/lib/exercises/math/calcul/fractions/fractionAndIntegerProduct.d.ts.map +1 -1
  8. package/lib/exercises/math/calcul/fractions/fractionAndIntegerProduct.js +6 -2
  9. package/lib/exercises/math/calcul/fractions/fractionsDivision.d.ts.map +1 -1
  10. package/lib/exercises/math/calcul/fractions/fractionsDivision.js +10 -4
  11. package/lib/exercises/math/calcul/fractions/fractionsProduct.d.ts.map +1 -1
  12. package/lib/exercises/math/calcul/fractions/fractionsProduct.js +6 -2
  13. package/lib/exercises/math/calcul/ordering/framing.d.ts.map +1 -1
  14. package/lib/exercises/math/calcul/ordering/framing.js +0 -1
  15. package/lib/exercises/math/calcul/proportionality/scaleCalculation.d.ts.map +1 -1
  16. package/lib/exercises/math/calcul/proportionality/scaleCalculation.js +4 -2
  17. package/lib/exercises/math/calcul/proportionality/scaleUsage.d.ts.map +1 -1
  18. package/lib/exercises/math/calcul/proportionality/scaleUsage.js +4 -2
  19. package/lib/exercises/math/calcul/rounding/rounding.d.ts.map +1 -1
  20. package/lib/exercises/math/calcul/rounding/rounding.js +7 -3
  21. package/lib/exercises/math/calculLitteral/distributivity/canonicalFormDevelopment.d.ts.map +1 -1
  22. package/lib/exercises/math/calculLitteral/distributivity/canonicalFormDevelopment.js +11 -5
  23. package/lib/exercises/math/calculLitteral/distributivity/firstIdentity.d.ts.map +1 -1
  24. package/lib/exercises/math/calculLitteral/distributivity/firstIdentity.js +14 -2
  25. package/lib/exercises/math/calculLitteral/distributivity/secondIdentity.d.ts.map +1 -1
  26. package/lib/exercises/math/calculLitteral/distributivity/secondIdentity.js +14 -2
  27. package/lib/exercises/math/calculLitteral/distributivity/thirdIdentity.d.ts.map +1 -1
  28. package/lib/exercises/math/calculLitteral/distributivity/thirdIdentity.js +14 -2
  29. package/lib/exercises/math/calculLitteral/equation/equationSimpleSquare.js +1 -1
  30. package/lib/exercises/math/calculLitteral/equation/multiplicationEquation.js +1 -1
  31. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq1.d.ts.map +1 -1
  32. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq1.js +12 -2
  33. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq2.d.ts.map +1 -1
  34. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq2.js +12 -2
  35. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq3.d.ts.map +1 -1
  36. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq3.js +12 -2
  37. package/lib/exercises/math/calculLitteral/factorisation/factorizeCanonicalForm.d.ts.map +1 -1
  38. package/lib/exercises/math/calculLitteral/factorisation/factorizeCanonicalForm.js +12 -2
  39. package/lib/exercises/math/calculLitteral/factorisation/factorizeCanonicalFormWithSqrt.d.ts.map +1 -1
  40. package/lib/exercises/math/calculLitteral/factorisation/factorizeCanonicalFormWithSqrt.js +12 -4
  41. package/lib/exercises/math/derivation/derivative/thirdDegreeFunctionVariation.d.ts.map +1 -1
  42. package/lib/exercises/math/derivation/derivative/thirdDegreeFunctionVariation.js +6 -6
  43. package/lib/exercises/math/derivation/derivativeNumberReading.d.ts.map +1 -1
  44. package/lib/exercises/math/derivation/derivativeNumberReading.js +5 -6
  45. package/lib/exercises/math/functions/affines/affineExpressionFromTwoImages.d.ts.map +1 -1
  46. package/lib/exercises/math/functions/affines/affineExpressionFromTwoImages.js +14 -2
  47. package/lib/exercises/math/functions/affines/affineExpressionReading.d.ts.map +1 -1
  48. package/lib/exercises/math/functions/affines/affineExpressionReading.js +5 -6
  49. package/lib/exercises/math/functions/affines/interceptReading.d.ts.map +1 -1
  50. package/lib/exercises/math/functions/affines/interceptReading.js +5 -6
  51. package/lib/exercises/math/functions/affines/leadingCoefficient.js +5 -5
  52. package/lib/exercises/math/functions/basics/graphicEquation.js +5 -5
  53. package/lib/exercises/math/functions/basics/graphicInequation.d.ts.map +1 -1
  54. package/lib/exercises/math/functions/basics/graphicInequation.js +4 -6
  55. package/lib/exercises/math/functions/basics/imageFunctionGeogebra.d.ts.map +1 -1
  56. package/lib/exercises/math/functions/basics/imageFunctionGeogebra.js +2 -4
  57. package/lib/exercises/math/functions/basics/inverseImageFunctionGeogebra.d.ts.map +1 -1
  58. package/lib/exercises/math/functions/basics/inverseImageFunctionGeogebra.js +4 -6
  59. package/lib/exercises/math/functions/basics/twoFunctionsEquation.d.ts.map +1 -1
  60. package/lib/exercises/math/functions/basics/twoFunctionsEquation.js +4 -6
  61. package/lib/exercises/math/functions/basics/twoFunctionsInequation.d.ts.map +1 -1
  62. package/lib/exercises/math/functions/basics/twoFunctionsInequation.js +4 -6
  63. package/lib/exercises/math/functions/parity/parityFromGraph.js +6 -6
  64. package/lib/exercises/math/functions/trinoms/rootsReading.d.ts.map +1 -1
  65. package/lib/exercises/math/functions/trinoms/rootsReading.js +4 -7
  66. package/lib/exercises/math/functions/trinoms/summitReading.d.ts.map +1 -1
  67. package/lib/exercises/math/functions/trinoms/summitReading.js +5 -4
  68. package/lib/exercises/math/geometry/areas/rightTriangleArea.d.ts.map +1 -1
  69. package/lib/exercises/math/geometry/areas/rightTriangleArea.js +5 -4
  70. package/lib/exercises/math/geometry/areas/triangleArea.d.ts.map +1 -1
  71. package/lib/exercises/math/geometry/areas/triangleArea.js +5 -4
  72. package/lib/exercises/math/geometry/cartesian/cartesianEquationOfLine.d.ts.map +1 -1
  73. package/lib/exercises/math/geometry/cartesian/cartesianEquationOfLine.js +8 -8
  74. package/lib/exercises/math/geometry/cartesian/directionVector.d.ts.map +1 -1
  75. package/lib/exercises/math/geometry/cartesian/directionVector.js +6 -5
  76. package/lib/exercises/math/geometry/cartesian/drawAlineInGGB.d.ts.map +1 -1
  77. package/lib/exercises/math/geometry/cartesian/drawAlineInGGB.js +9 -8
  78. package/lib/exercises/math/geometry/cartesian/placeAPoint.d.ts.map +1 -1
  79. package/lib/exercises/math/geometry/cartesian/placeAPoint.js +9 -7
  80. package/lib/exercises/math/geometry/cartesian/pointCoordinates.d.ts.map +1 -1
  81. package/lib/exercises/math/geometry/cartesian/pointCoordinates.js +12 -6
  82. package/lib/exercises/math/geometry/convexity/convexityQuadrinomialsGeo.d.ts.map +1 -1
  83. package/lib/exercises/math/geometry/convexity/convexityQuadrinomialsGeo.js +7 -6
  84. package/lib/exercises/math/geometry/convexity/convexityTrinomialsGeo.js +6 -6
  85. package/lib/exercises/math/geometry/pythagore/pythagore.d.ts.map +1 -1
  86. package/lib/exercises/math/geometry/pythagore/pythagore.js +5 -4
  87. package/lib/exercises/math/geometry/pythagore/pythagoreCalcul.d.ts.map +1 -1
  88. package/lib/exercises/math/geometry/pythagore/pythagoreCalcul.js +5 -4
  89. package/lib/exercises/math/geometry/thales/thales.d.ts.map +1 -1
  90. package/lib/exercises/math/geometry/thales/thales.js +5 -4
  91. package/lib/exercises/math/geometry/thales/thalesCalcul.d.ts.map +1 -1
  92. package/lib/exercises/math/geometry/thales/thalesCalcul.js +5 -4
  93. package/lib/exercises/math/geometry/vectors/coordinatesReading.d.ts.map +1 -1
  94. package/lib/exercises/math/geometry/vectors/coordinatesReading.js +5 -6
  95. package/lib/exercises/math/geometry/vectors/drawAVectorInGGB.d.ts.map +1 -1
  96. package/lib/exercises/math/geometry/vectors/drawAVectorInGGB.js +10 -8
  97. package/lib/exercises/math/geometry/vectors/equalCaracteristicFromGraph.js +5 -5
  98. package/lib/exercises/math/geometry/vectors/scalarProductViaCoords.d.ts.map +1 -1
  99. package/lib/exercises/math/geometry/vectors/scalarProductViaCoords.js +5 -1
  100. package/lib/exercises/math/geometry/vectors/vectorCoordinatesFromTwoPoints.d.ts.map +1 -1
  101. package/lib/exercises/math/geometry/vectors/vectorCoordinatesFromTwoPoints.js +5 -3
  102. package/lib/exercises/math/geometry/volumes/coneVolume.js +6 -6
  103. package/lib/exercises/math/geometry/volumes/parallelepipedVolume.js +6 -6
  104. package/lib/exercises/math/geometry/volumes/sphereVolume.js +6 -6
  105. package/lib/exercises/math/geometry/volumes/volumeOfCube.d.ts.map +1 -1
  106. package/lib/exercises/math/geometry/volumes/volumeOfCube.js +5 -4
  107. package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithSquareOrRectBase.d.ts.map +1 -1
  108. package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithSquareOrRectBase.js +5 -4
  109. package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleBase.d.ts.map +1 -1
  110. package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleBase.js +12 -11
  111. package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleRectBase.d.ts.map +1 -1
  112. package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleRectBase.js +5 -4
  113. package/lib/exercises/math/limits/limitReading.js +6 -6
  114. package/lib/exercises/math/percent/applyPercent.d.ts.map +1 -1
  115. package/lib/exercises/math/percent/applyPercent.js +10 -2
  116. package/lib/exercises/math/percent/averageEvolutionRate.d.ts.map +1 -1
  117. package/lib/exercises/math/percent/averageEvolutionRate.js +9 -4
  118. package/lib/exercises/math/percent/cmToEvolution.d.ts.map +1 -1
  119. package/lib/exercises/math/percent/cmToEvolution.js +3 -1
  120. package/lib/exercises/math/percent/globalPercent.d.ts.map +1 -1
  121. package/lib/exercises/math/percent/globalPercent.js +5 -3
  122. package/lib/exercises/math/probaStat/probabilityTree.d.ts.map +1 -1
  123. package/lib/exercises/math/probaStat/probabilityTree.js +5 -4
  124. package/lib/exercises/math/probaStat/stats2var/fineAdjustementExercise.d.ts.map +1 -1
  125. package/lib/exercises/math/probaStat/stats2var/fineAdjustementExercise.js +5 -4
  126. package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromGraph.js +13 -13
  127. package/lib/exercises/math/sequences/arithmetic/recognizeReasonFromGraph.js +10 -10
  128. package/lib/exercises/math/sequences/sequencePlot.d.ts.map +1 -1
  129. package/lib/exercises/math/sequences/sequencePlot.js +10 -12
  130. package/lib/exercises/math/spaceGeometry/vectors/spaceVectorCoordinatesFromPoints.d.ts.map +1 -1
  131. package/lib/exercises/math/spaceGeometry/vectors/spaceVectorCoordinatesFromPoints.js +3 -1
  132. package/lib/exercises/math/trigonometry/trigonometry.d.ts.map +1 -1
  133. package/lib/exercises/math/trigonometry/trigonometry.js +5 -4
  134. package/lib/exercises/math/trigonometry/trigonometryAngleCalcul.d.ts.map +1 -1
  135. package/lib/exercises/math/trigonometry/trigonometryAngleCalcul.js +5 -4
  136. package/lib/exercises/math/trigonometry/trigonometrySideCalcul.d.ts.map +1 -1
  137. package/lib/exercises/math/trigonometry/trigonometrySideCalcul.js +5 -4
  138. package/lib/exercises/pc/calibrationCurveOfSolution.d.ts.map +1 -1
  139. package/lib/exercises/pc/calibrationCurveOfSolution.js +11 -8
  140. package/lib/exercises/pc/electricity/ohmicConductorOrGenerator.d.ts.map +1 -1
  141. package/lib/exercises/pc/electricity/ohmicConductorOrGenerator.js +15 -5
  142. package/lib/exercises/pc/forces/calculateNormalOrFrictionForce.d.ts.map +1 -1
  143. package/lib/exercises/pc/forces/calculateNormalOrFrictionForce.js +0 -1
  144. package/lib/exercises/pc/math/proportionnalityCoeffFromLine.d.ts.map +1 -1
  145. package/lib/exercises/pc/math/proportionnalityCoeffFromLine.js +7 -6
  146. package/lib/exercises/pc/mecanicalWaves/elongationReading.d.ts.map +1 -1
  147. package/lib/exercises/pc/mecanicalWaves/elongationReading.js +7 -6
  148. package/lib/exercises/pc/mole/concentrationReading.d.ts.map +1 -1
  149. package/lib/exercises/pc/mole/concentrationReading.js +8 -6
  150. package/lib/exercises/pc/motion/characteristicsOfVelocityVector.d.ts.map +1 -1
  151. package/lib/exercises/pc/motion/characteristicsOfVelocityVector.js +2 -3
  152. package/lib/exercises/pc/motion/typeOfAcceleration.d.ts.map +1 -1
  153. package/lib/exercises/pc/motion/typeOfAcceleration.js +5 -4
  154. package/lib/exercises/pc/motion/typeOfMovement.js +4 -4
  155. package/lib/exercises/pc/recognizeRefractionOrReflectionAngles.d.ts.map +1 -1
  156. package/lib/exercises/pc/recognizeRefractionOrReflectionAngles.js +5 -4
  157. package/lib/exercises/pc/sound/findPeriodFromGraph.d.ts.map +1 -1
  158. package/lib/exercises/pc/sound/findPeriodFromGraph.js +7 -5
  159. package/lib/exercises/pc/sound/findPeriodOrFrequencyFromGraph.d.ts.map +1 -1
  160. package/lib/exercises/pc/sound/findPeriodOrFrequencyFromGraph.js +7 -6
  161. package/lib/exercises/utils/getDistinctQuestions.d.ts.map +1 -1
  162. package/lib/exercises/utils/getDistinctQuestions.js +2 -1
  163. package/lib/geogebra/geogebraConstructor.d.ts +18 -23
  164. package/lib/geogebra/geogebraConstructor.d.ts.map +1 -1
  165. package/lib/geogebra/geogebraConstructor.js +23 -16
  166. package/lib/index.d.ts +1 -76
  167. package/lib/index.d.ts.map +1 -1
  168. package/lib/index.js +1 -57
  169. package/lib/prototypesEnhancement.d.ts +14 -0
  170. package/lib/prototypesEnhancement.d.ts.map +1 -0
  171. package/lib/prototypesEnhancement.js +26 -0
  172. package/lib/server.d.ts +1 -12
  173. package/lib/server.d.ts.map +1 -1
  174. package/lib/server.js +1 -24
  175. package/lib/utils/alignTex.js +2 -2
  176. package/package.json +3 -2
@@ -1 +1 @@
1
- {"version":3,"file":"volumeOfPyramidWithTriangleRectBase.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleRectBase.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAYlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,kBAAkB,EAAE,aAAa,CAAC;CACnC,CAAC;AAQF,KAAK,aAAa,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AA0JxE,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAejD,CAAC"}
1
+ {"version":3,"file":"volumeOfPyramidWithTriangleRectBase.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleRectBase.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAYlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,kBAAkB,EAAE,aAAa,CAAC;CACnC,CAAC;AAQF,KAAK,aAAa,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AA2JxE,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAejD,CAAC"}
@@ -27,7 +27,8 @@ const getVolumeOfPyramidWithTriangleRectBase = () => {
27
27
  const commands = exercise.commands;
28
28
  const baseOfPyramidSides = exercise.baseOfPyramidSides;
29
29
  const volume = calculateVolume(baseOfPyramidSides, exercise.h);
30
- const ggb = new geogebraConstructor_1.GeogebraConstructor(commands, {
30
+ const ggb = new geogebraConstructor_1.GeogebraConstructor({
31
+ commands,
31
32
  hideAxes: true,
32
33
  hideGrid: true,
33
34
  is3D: true,
@@ -39,9 +40,9 @@ const getVolumeOfPyramidWithTriangleRectBase = () => {
39
40
  Calculer le volume de la pyramide en sachant que : $AB=${baseOfPyramidSides.ABSide}$, $AC=${baseOfPyramidSides.ACSide}$, $BC=${baseOfPyramidSides.BCSide}$ et $(AC)\\perp(AB)$.`,
40
41
  keys: [],
41
42
  answerFormat: "tex",
42
- commands: ggb.commands,
43
- options: ggb.getOptions(),
44
- coords: [-2, maxCoord + 1, -2, maxCoord + 1, -2, exercise.h + 1],
43
+ ggbOptions: ggb.getOptions({
44
+ coords: [-2, maxCoord + 1, -2, maxCoord + 1, -2, exercise.h + 1],
45
+ }),
45
46
  identifiers: { h: exercise.h, baseOfPyramidSides },
46
47
  };
47
48
  return question;
@@ -72,17 +72,17 @@ const getLimitReadingQuestion = () => {
72
72
  break;
73
73
  }
74
74
  const commands = [`f(x) = ${fct}`, `SetColor(f, "${(0, colors_1.randomColor)()}")`];
75
- const ggb = new geogebraConstructor_1.GeogebraConstructor(commands, {
76
- isAxesRatioFixed: false,
77
- isGridSimple: true,
75
+ const ggb = new geogebraConstructor_1.GeogebraConstructor({
76
+ commands,
77
+ lockedAxesRatio: false,
78
78
  });
79
79
  const question = {
80
80
  answer,
81
81
  instruction: `Ci-dessous est tracée la courbe représentative d'une fonction $f$. Déterminer la limite: $\\displaystyle ${new limitNode_1.LimitNode(to, new variableNode_1.VariableNode("f(x)"), from).toTex()}$`,
82
82
  keys: ["infty"],
83
- commands: ggb.commands,
84
- coords: [-10, 10, -10, 10],
85
- options: ggb.getOptions(),
83
+ ggbOptions: ggb.getOptions({
84
+ coords: [-10, 10, -10, 10],
85
+ }),
86
86
  answerFormat: "tex",
87
87
  identifiers: { type, to: to.toTex(), from, a },
88
88
  };
@@ -1 +1 @@
1
- {"version":3,"file":"applyPercent.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/applyPercent.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,QAAQ,EAQT,MAAM,gBAAgB,CAAC;AAGxB,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,OAAO,CAAC;CACf,CAAC;AA6EF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAwB9C,CAAC"}
1
+ {"version":3,"file":"applyPercent.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/applyPercent.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,QAAQ,EAQT,MAAM,gBAAgB,CAAC;AAGxB,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,OAAO,CAAC;CACf,CAAC;AAqFF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAwB9C,CAAC"}
@@ -40,12 +40,20 @@ const getApplyPercentQuestion = () => {
40
40
  correction: isUp
41
41
  ? `Augmenter un nombre de $${randPercent}\\%$ revient à le multiplier par $1 + \\frac{${randPercent}}{100}$, c'est à dire par $${(0, round_1.round)(cm, 2).frenchify()}$.
42
42
 
43
- On a donc $${randNbr}\\times ${(0, round_1.round)(cm, 2).frenchify()} = ${answer}$.
43
+ On a donc
44
+
45
+ $$
46
+ ${randNbr}\\times ${(0, round_1.round)(cm, 2).frenchify()} = ${answer}
47
+ $$
44
48
 
45
49
  `
46
50
  : `Baisser un nombre de $${randPercent}\\%$ revient à le multiplier par $1 - \\frac{${randPercent}}{100}$, c'est à dire par $${(0, round_1.round)(cm, 2).frenchify()}$.
47
51
 
48
- On a donc $${randNbr}\\times ${(0, round_1.round)(cm, 2).frenchify()} = ${answer}$.
52
+ On a donc
53
+
54
+ $$
55
+ ${randNbr}\\times ${(0, round_1.round)(cm, 2).frenchify()} = ${answer}
56
+ $$
49
57
 
50
58
  `,
51
59
  identifiers: { isUp, randNbr, randPercent },
@@ -1 +1 @@
1
- {"version":3,"file":"averageEvolutionRate.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/averageEvolutionRate.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,QAAQ,EAQT,MAAM,gBAAgB,CAAC;AAGxB,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAqEF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CActD,CAAC"}
1
+ {"version":3,"file":"averageEvolutionRate.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/averageEvolutionRate.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,QAAQ,EAQT,MAAM,gBAAgB,CAAC;AAGxB,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AA0EF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CActD,CAAC"}
@@ -21,16 +21,21 @@ const getAverageEvolutionRate = () => {
21
21
  hint: `Commence par déterminer le coefficient multiplicateur assoicié à une hausse de $${rate}\\%$. Puis, élève ce coefficient à la puissance $\\frac{1}{${nbMois}}$. Enfin, transforme le coefficient multiplicateur obtenu en taux d'évolution.`,
22
22
  correction: `Le coefficient multiplicateur associé à une hausse de $${rate}\\%$ est :
23
23
 
24
- $1+\\frac{${rate}}{100} = ${(1 + rate / 100).frenchify()}$
24
+ $$
25
+ 1+\\frac{${rate}}{100} = ${(1 + rate / 100).frenchify()}
26
+ $$
25
27
 
26
28
  Le coefficient multiplicateur moyen pour chaque mois sur une période de $${nbMois}$ mois est donc de :
27
29
 
28
- $\\left(${(1 +
29
- rate / 100).frenchify()}\\right)^{\\frac{1}{${nbMois}}} = ${(0, round_1.round)(Math.pow(1 + rate / 100, 1 / nbMois), 4).frenchify()}$
30
+ $$\\left(${(1 +
31
+ rate / 100).frenchify()}\\right)^{\\frac{1}{${nbMois}}} = ${(0, round_1.round)(Math.pow(1 + rate / 100, 1 / nbMois), 4).frenchify()}
32
+ $$
30
33
 
31
34
  On transforme alors ce coefficient multiplicateur en taux d'évolution :
32
35
 
33
- $t = (${(0, round_1.round)(Math.pow(1 + rate / 100, 1 / nbMois), 4).frenchify()}-1)\\times 100 = ${answer.frenchify()}$
36
+ $$
37
+ t = (${(0, round_1.round)(Math.pow(1 + rate / 100, 1 / nbMois), 4).frenchify()}-1)\\times 100 = ${answer.frenchify()}
38
+ $$
34
39
 
35
40
  Le taux d'évoution mensuel moyen est donc de $${answerTex}$.`,
36
41
  };
@@ -1 +1 @@
1
- {"version":3,"file":"cmToEvolution.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/cmToEvolution.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AA8DF,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,WAAW,CAc/C,CAAC"}
1
+ {"version":3,"file":"cmToEvolution.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/cmToEvolution.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAgEF,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,WAAW,CAc/C,CAAC"}
@@ -21,7 +21,9 @@ const getCmToEvolutionQuestion = () => {
21
21
  hint: "Pour trouver le taux d'évolution $t$ à partir du coefficient multiplicateur (CM) utilise la formule $t = \\left(\\text{CM}-1\\right)\\times 100$.",
22
22
  correction: `Le taux d'évolution $t$ s'obtient par la formule
23
23
 
24
- $$t = \\left(\\text{CM}-1\\right)\\times 100$$
24
+ $$
25
+ t = \\left(\\text{CM}-1\\right)\\times 100
26
+ $$
25
27
 
26
28
  Ici, on a donc :
27
29
 
@@ -1 +1 @@
1
- {"version":3,"file":"globalPercent.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/globalPercent.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAQT,MAAM,gBAAgB,CAAC;AAMxB,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAuFF,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,WAAW,CAe/C,CAAC"}
1
+ {"version":3,"file":"globalPercent.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/percent/globalPercent.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAQT,MAAM,gBAAgB,CAAC;AAMxB,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAyFF,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,WAAW,CAe/C,CAAC"}
@@ -37,13 +37,15 @@ const getGlobalPercentQuestion = () => {
37
37
  hint: "Transforme chaque taux d'évolution en coefficient multiplicateur, puis multiplie ces coefficients multiplicateurs entre eux pour obtenir le coefficient multiplicateur global. Transforme alors ce CM global en taux d'évolution.",
38
38
  correction: `On transforme les taux d'évolution en coefficients multiplicateurs puis on les multiplie entre eux :
39
39
 
40
- $${evolutions
40
+ $$${evolutions
41
41
  .map((e) => (0, round_1.round)(1 + Number(e) / 100, 2).frenchify())
42
- .join(" \\times ")} = ${(0, round_1.round)(evolutions.reduce((acc, curr) => acc * (0, round_1.round)(1 + Number(curr) / 100, 2), 1), 4).frenchify()}$
42
+ .join(" \\times ")} = ${(0, round_1.round)(evolutions.reduce((acc, curr) => acc * (0, round_1.round)(1 + Number(curr) / 100, 2), 1), 4).frenchify()}
43
+ $$
43
44
 
44
45
  Enfin, on transforme ce CM global en taux d'évolution :
45
46
 
46
- $(${(0, round_1.round)(evolutions.reduce((acc, curr) => acc * (0, round_1.round)(1 + Number(curr) / 100, 2), 1), 4).frenchify()} - 1)\\times 100 = ${answer.replace("\\%", "")}$
47
+ $$(${(0, round_1.round)(evolutions.reduce((acc, curr) => acc * (0, round_1.round)(1 + Number(curr) / 100, 2), 1), 4).frenchify()} - 1)\\times 100 = ${answer.replace("\\%", "")}
48
+ $$
47
49
 
48
50
  Le taux d'évolution global est donc de $${answer}$.
49
51
  `,
@@ -1 +1 @@
1
- {"version":3,"file":"probabilityTree.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/probaStat/probabilityTree.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,QAAQ,EAQT,MAAM,gBAAgB,CAAC;AAGxB,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AA8IF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAsBjD,CAAC"}
1
+ {"version":3,"file":"probabilityTree.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/probaStat/probabilityTree.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,QAAQ,EAQT,MAAM,gBAAgB,CAAC;AAGxB,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AA+IF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAsBjD,CAAC"}
@@ -88,7 +88,8 @@ const getProbabilityTree = () => {
88
88
  'Text("C", (5.5 , -1.1))',
89
89
  'Text("D", (5.5 , -3.1))',
90
90
  ];
91
- const ggb = new geogebraConstructor_1.GeogebraConstructor(commands, {
91
+ const ggb = new geogebraConstructor_1.GeogebraConstructor({
92
+ commands,
92
93
  hideAxes: true,
93
94
  hideGrid: true,
94
95
  });
@@ -97,9 +98,9 @@ const getProbabilityTree = () => {
97
98
  startStatement,
98
99
  answer: answerTex,
99
100
  keys: [],
100
- commands,
101
- options: ggb.getOptions(),
102
- coords: [-2, 8, -5, 5],
101
+ ggbOptions: ggb.getOptions({
102
+ coords: [-2, 8, -5, 5],
103
+ }),
103
104
  answerFormat: "tex",
104
105
  identifiers: { A, AC, AD, B, BC, BD, type },
105
106
  };
@@ -1 +1 @@
1
- {"version":3,"file":"fineAdjustementExercise.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats2var/fineAdjustementExercise.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,OAAO,CAAC;CACtB,CAAC;AAqHF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAezD,CAAC"}
1
+ {"version":3,"file":"fineAdjustementExercise.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats2var/fineAdjustementExercise.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,OAAO,CAAC;CACtB,CAAC;AAsHF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAezD,CAAC"}
@@ -23,7 +23,8 @@ const getFineAdjustementExerciseQuestion = () => {
23
23
  commands.push(...cloudPoints.points.map((point) => {
24
24
  return `SetFixed(${point.name},true)`;
25
25
  }));
26
- const ggb = new geogebraConstructor_1.GeogebraConstructor(commands, {
26
+ const ggb = new geogebraConstructor_1.GeogebraConstructor({
27
+ commands,
27
28
  hideAxes: true,
28
29
  hideGrid: true,
29
30
  });
@@ -34,9 +35,9 @@ const getFineAdjustementExerciseQuestion = () => {
34
35
  const question = {
35
36
  answer: exercise.correctAnswer,
36
37
  instruction: `On considère le nuage de points ci-dessous. Un ajustement affine semble-t-il justifié ? Quelle peut être la valeur du coefficient de détermination ?`,
37
- commands: ggb.commands,
38
- options: ggb.getOptions(),
39
- coords: ggb.getAdaptedCoords({ xMin, xMax, yMin, yMax }),
38
+ ggbOptions: ggb.getOptions({
39
+ coords: ggb.getAdaptedCoords({ xMin, xMax, yMin, yMax }),
40
+ }),
40
41
  keys: [],
41
42
  answerFormat: "raw",
42
43
  identifiers: { isJustified: exercise.isJustified },
@@ -14,19 +14,19 @@ const getRandomFirstNonAriTerms = () => {
14
14
  case 0:
15
15
  const firstGeoTerm = (0, randint_1.randint)(1, 4);
16
16
  const geoReason = (0, random_1.random)([2, 3]);
17
- return new Array(5)
17
+ return new Array(10)
18
18
  .fill(0)
19
19
  .map((el, index) => firstGeoTerm * geoReason ** index);
20
20
  case 1:
21
21
  const firstBernoulliTerm = (0, randint_1.randint)(1, 10);
22
22
  const secondBernoulliTerm = (0, randint_1.randint)(1, 10, [firstBernoulliTerm]);
23
- return new Array(5)
23
+ return new Array(10)
24
24
  .fill(0)
25
25
  .map((el, index) => index % 2 ? firstBernoulliTerm : secondBernoulliTerm);
26
26
  case 2:
27
27
  default:
28
28
  const firstFakeAriTerm = (0, randint_1.randint)(1, 20);
29
- const res = new Array(5)
29
+ const res = new Array(10)
30
30
  .fill(0)
31
31
  .map((el, index) => firstFakeAriTerm + (0, randint_1.randint)(1, 4));
32
32
  const disruptionIndex = (0, randint_1.randint)(0, 5);
@@ -39,27 +39,27 @@ const getRecognizeArithmeticFromGraphQuestion = () => {
39
39
  const firstAriTerm = (0, randint_1.randint)(-5, 10);
40
40
  const reason = (0, randint_1.randint)(-4, 6, [0]);
41
41
  const sequence = isAri
42
- ? new Array(5).fill(0).map((el, index) => firstAriTerm + reason * index)
42
+ ? new Array(10).fill(0).map((el, index) => firstAriTerm + reason * index)
43
43
  : getRandomFirstNonAriTerms();
44
44
  const answer = isAri ? "Oui" : "Non";
45
45
  const commands = sequence.flatMap((nb, index) => [
46
46
  new point_1.Point(`A_${index}`, index.toTree(), nb.toTree()).toGGBCommand(),
47
47
  `SetFixed(A_${index}, true)`,
48
48
  ]);
49
- const ggb = new geogebraConstructor_1.GeogebraConstructor(commands, {
50
- isAxesRatioFixed: false,
51
- isXAxesNatural: true,
52
- isGridSimple: true,
49
+ const ggb = new geogebraConstructor_1.GeogebraConstructor({
50
+ commands,
51
+ lockedAxesRatio: false,
52
+ xAxis: { natural: true },
53
53
  });
54
- const yMin = Math.min(...sequence);
55
- const yMax = Math.max(...sequence);
54
+ const yMin = Math.min(...sequence.slice(0, 5));
55
+ const yMax = Math.max(...sequence.slice(0, 5));
56
56
  const question = {
57
57
  answer,
58
58
  instruction: `La suite $u$ représentée ci-dessous semble-t-elle arithmétique ?`,
59
59
  keys: [],
60
- commands: ggb.commands,
61
- options: ggb.getOptions(),
62
- coords: [-1, 7, Math.min(-1, yMin - 2), Math.max(1, yMax + 2)],
60
+ ggbOptions: ggb.getOptions({
61
+ coords: [-1, 7, Math.min(-1, yMin - 2), Math.max(1, yMax + 2)],
62
+ }),
63
63
  answerFormat: "tex",
64
64
  identifiers: { sequence, isAri },
65
65
  };
@@ -9,28 +9,28 @@ const randint_1 = require("../../../../math/utils/random/randint");
9
9
  const getRecognizeReasonFromGraphQuestion = () => {
10
10
  const firstTerm = (0, randint_1.randint)(1, 20);
11
11
  const reason = (0, randint_1.randint)(-5, 6, [0]);
12
- const sequence = new Array(5)
12
+ const sequence = new Array(10)
13
13
  .fill(0)
14
14
  .map((el, index) => firstTerm + index * reason);
15
- const yMin = Math.min(...sequence);
16
- const yMax = Math.max(...sequence);
15
+ const yMin = Math.min(...sequence.slice(0, 5));
16
+ const yMax = Math.max(...sequence.slice(0, 5));
17
17
  const commands = sequence.flatMap((nb, index) => [
18
18
  new point_1.Point(`A_${index}`, index.toTree(), nb.toTree()).toGGBCommand(),
19
19
  `SetFixed(A_${index}, true)`,
20
20
  ]);
21
- const ggb = new geogebraConstructor_1.GeogebraConstructor(commands, {
22
- isGridSimple: true,
23
- isXAxesNatural: true,
24
- isAxesRatioFixed: false,
21
+ const ggb = new geogebraConstructor_1.GeogebraConstructor({
22
+ commands,
23
+ xAxis: { natural: true },
24
+ lockedAxesRatio: false,
25
25
  });
26
26
  const answer = reason + "";
27
27
  const question = {
28
28
  answer,
29
29
  instruction: `Déterminer la raison de la suite arithmétique $u$ représentée ci-dessous :`,
30
30
  keys: [],
31
- commands: ggb.commands,
32
- options: ggb.getOptions(),
33
- coords: [-1, 7, Math.min(-1, yMin - 2), Math.max(1, yMax + 2)],
31
+ ggbOptions: ggb.getOptions({
32
+ coords: [-1, 7, Math.min(-1, yMin - 2), Math.max(1, yMax + 2)],
33
+ }),
34
34
  answerFormat: "tex",
35
35
  identifiers: { reason, sequence },
36
36
  };
@@ -1 +1 @@
1
- {"version":3,"file":"sequencePlot.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/sequences/sequencePlot.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,EAAE,EAAE,CAAC;IACnB,YAAY,EAAE,OAAO,CAAC;CACvB,CAAC;AA2FF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAe9C,CAAC"}
1
+ {"version":3,"file":"sequencePlot.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/sequences/sequencePlot.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,EAAE,EAAE,CAAC;IACnB,YAAY,EAAE,OAAO,CAAC;CACvB,CAAC;AA0FF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAe9C,CAAC"}
@@ -35,23 +35,21 @@ const getSequencePlotQuestion = () => {
35
35
  }), ...points.map((_, index) => {
36
36
  return `SetLabelMode(A${index},1)`;
37
37
  }));
38
- const ggb = new geogebraConstructor_1.GeogebraConstructor(commands, {
39
- hideAxes: false,
40
- hideGrid: false,
41
- isXAxesNatural: true,
42
- isGridSimple: true,
38
+ const ggb = new geogebraConstructor_1.GeogebraConstructor({
39
+ commands,
40
+ xAxis: { natural: true },
43
41
  });
44
42
  const answer = u_nValue.toString();
45
43
  const question = {
46
44
  answer,
47
45
  instruction: `Ci-dessous est tracé un nuage de points représentant les valeurs d'une suite $(u_n)$. Quelle est la valeur de $u_{${nValue}}$ ?`,
48
- commands: ggb.commands,
49
- options: ggb.getOptions(),
50
- coords: ggb.getAdaptedCoords({
51
- xMin: 0,
52
- xMax: nMax,
53
- yMin: Math.min(...points.map((p) => p[1])) - 2,
54
- yMax: Math.max(...points.map((p) => p[1])) + 2,
46
+ ggbOptions: ggb.getOptions({
47
+ coords: ggb.getAdaptedCoords({
48
+ xMin: 0,
49
+ xMax: nMax,
50
+ yMin: Math.min(...points.map((p) => p[1])) - 2,
51
+ yMax: Math.max(...points.map((p) => p[1])) + 2,
52
+ }),
55
53
  }),
56
54
  keys: [],
57
55
  answerFormat: "raw",
@@ -1 +1 @@
1
- {"version":3,"file":"spaceVectorCoordinatesFromPoints.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/spaceGeometry/vectors/spaceVectorCoordinatesFromPoints.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG,EAAE,CAAC;AAmEtB,eAAO,MAAM,gCAAgC,EAAE,QAAQ,CAAC,WAAW,CAgBlE,CAAC"}
1
+ {"version":3,"file":"spaceVectorCoordinatesFromPoints.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/spaceGeometry/vectors/spaceVectorCoordinatesFromPoints.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG,EAAE,CAAC;AAqEtB,eAAO,MAAM,gCAAgC,EAAE,QAAQ,CAAC,WAAW,CAgBlE,CAAC"}
@@ -26,7 +26,9 @@ const getSpaceVectorCoordinatesFromPointsQuestion = () => {
26
26
  },
27
27
  hint: `Soient deux points $M(x_M;y_M;z_M)$ et $N(x_N;y_N;z_N)$, alors le vecteur $\\overrightarrow{MN}$ a pour coordonnées :
28
28
 
29
- $\\overrightarrow{MN} \\begin{pmatrix} x_N - x_M \\\\ y_N - y_M \\\\ z_N - z_M \\end{pmatrix}$`,
29
+ $$
30
+ \\overrightarrow{MN} \\begin{pmatrix} x_N - x_M \\\\ y_N - y_M \\\\ z_N - z_M \\end{pmatrix}
31
+ $$`,
30
32
  correction: `Les coordonnées du vecteur $\\overrightarrow{AB}$ sont :
31
33
 
32
34
  ${(0, alignTex_1.alignTex)([
@@ -1 +1 @@
1
- {"version":3,"file":"trigonometry.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/trigonometry/trigonometry.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAqHF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAe9C,CAAC"}
1
+ {"version":3,"file":"trigonometry.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/trigonometry/trigonometry.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAmHF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAe9C,CAAC"}
@@ -45,7 +45,8 @@ const getTrigonometry = () => {
45
45
  default:
46
46
  quotient = [""];
47
47
  }
48
- const ggb = new geogebraConstructor_1.GeogebraConstructor(triangle.generateCommands({ highlightedAngle: angle[randAngle] }), {
48
+ const ggb = new geogebraConstructor_1.GeogebraConstructor({
49
+ commands: triangle.generateCommands({ highlightedAngle: angle[randAngle] }),
49
50
  hideAxes: true,
50
51
  hideGrid: true,
51
52
  });
@@ -54,9 +55,9 @@ const getTrigonometry = () => {
54
55
  instruction: `À quel quotient est égal ${trigo[randTrigo]} de l'angle $\\widehat{${angle[randAngle]}}$?`,
55
56
  answer,
56
57
  keys: [...vertices, "equal"],
57
- commands: ggb.commands,
58
- options: ggb.getOptions(),
59
- coords: triangle.generateCoords(),
58
+ ggbOptions: ggb.getOptions({
59
+ coords: triangle.generateCoords(),
60
+ }),
60
61
  answerFormat: "tex",
61
62
  identifiers: { sideA, sideB, sideC, randAngle, randTrigo },
62
63
  };
@@ -1 +1 @@
1
- {"version":3,"file":"trigonometryAngleCalcul.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/trigonometry/trigonometryAngleCalcul.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC;AA8EF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAezD,CAAC"}
1
+ {"version":3,"file":"trigonometryAngleCalcul.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/trigonometry/trigonometryAngleCalcul.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC;AA4EF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAezD,CAAC"}
@@ -35,7 +35,8 @@ const getTrigonometryAngleCalcul = () => {
35
35
  ? Math.round((Math.acos(sideLengths[0] / sideLengths[2]) * 180) / Math.PI)
36
36
  : Math.round((Math.acos(sideLengths[1] / sideLengths[2]) * 180) / Math.PI);
37
37
  const answerTex = answer + "^{\\circ}";
38
- const ggb = new geogebraConstructor_1.GeogebraConstructor(triangle.generateCommands({ highlightedAngle: angle[randAngle] }), {
38
+ const ggb = new geogebraConstructor_1.GeogebraConstructor({
39
+ commands: triangle.generateCommands({ highlightedAngle: angle[randAngle] }),
39
40
  hideAxes: true,
40
41
  hideGrid: true,
41
42
  });
@@ -43,9 +44,9 @@ const getTrigonometryAngleCalcul = () => {
43
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.`,
44
45
  answer: answerTex,
45
46
  keys: ["degree"],
46
- commands: ggb.commands,
47
- options: ggb.getOptions(),
48
- coords: triangle.generateCoords(),
47
+ ggbOptions: ggb.getOptions({
48
+ coords: triangle.generateCoords(),
49
+ }),
49
50
  answerFormat: "tex",
50
51
  identifiers: { randAngle, sideLengths, randSides },
51
52
  };
@@ -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;AAuMF,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,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"}
@@ -46,7 +46,8 @@ const getTrigonometrySideCalcul = () => {
46
46
  highlightedSide: sides[randSideQuestion],
47
47
  }),
48
48
  ];
49
- const ggb = new geogebraConstructor_1.GeogebraConstructor(commands, {
49
+ const ggb = new geogebraConstructor_1.GeogebraConstructor({
50
+ commands,
50
51
  hideAxes: true,
51
52
  hideGrid: true,
52
53
  });
@@ -57,9 +58,9 @@ const getTrigonometrySideCalcul = () => {
57
58
  hint: getHint(),
58
59
  correction: getCorrection(sides, sideLengths, randSideQuestion, randSide, angle[randAngle], angleValue[randAngle], answer),
59
60
  keys: [],
60
- commands: ggb.commands,
61
- options: ggb.getOptions(),
62
- coords: triangle.generateCoords(),
61
+ ggbOptions: ggb.getOptions({
62
+ coords: triangle.generateCoords(),
63
+ }),
63
64
  answerFormat: "tex",
64
65
  identifiers: { randAngle, randSide, randSideQuestion, sideLengths },
65
66
  };
@@ -1 +1 @@
1
- {"version":3,"file":"calibrationCurveOfSolution.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/calibrationCurveOfSolution.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAuFF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAc5D,CAAC"}
1
+ {"version":3,"file":"calibrationCurveOfSolution.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/calibrationCurveOfSolution.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAYlC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAwFF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAc5D,CAAC"}
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.calibrationCurveOfSolution = void 0;
4
4
  const getDistinctQuestions_1 = require("../../exercises/utils/getDistinctQuestions");
5
+ const geogebraConstructor_1 = require("../../geogebra/geogebraConstructor");
5
6
  const randint_1 = require("../../math/utils/random/randint");
6
7
  const molecule_1 = require("../../pc/constants/molecularChemistry/molecule");
7
8
  const arrayEqual_1 = require("../../utils/arrayEqual");
@@ -14,6 +15,14 @@ const getCalibrationCurveOfSolutionQuestion = () => {
14
15
  const exo = generateExercise();
15
16
  const minY = 5 * exo.epsilon * exo.l - 10;
16
17
  const maxY = 10 * exo.epsilon * exo.l + 5;
18
+ const studentGGB = new geogebraConstructor_1.GeogebraConstructor({
19
+ customToolBar: (0, toolBarConstructor_1.toolBarConstructor)({
20
+ join: true,
21
+ }),
22
+ xAxis: { label: "$\\small{C}$" },
23
+ yAxis: { label: "$\\small{A}$" },
24
+ lockedAxesRatio: false,
25
+ });
17
26
  const question = {
18
27
  ggbAnswer: [
19
28
  `(5,${5 * exo.epsilon * exo.l})`,
@@ -22,15 +31,9 @@ const getCalibrationCurveOfSolutionQuestion = () => {
22
31
  ],
23
32
  instruction: exo.instruction,
24
33
  keys: [],
25
- studentGgbOptions: {
34
+ studentGgbOptions: studentGGB.getOptions({
26
35
  coords: [-1, 5, -1, 6],
27
- isAxesRatioFixed: false,
28
- enableShiftDragZoom: true,
29
- axisLabels: ["$\\small{C}$", "$\\small{A}$"],
30
- customToolBar: (0, toolBarConstructor_1.toolBarConstructor)({
31
- join: true,
32
- }),
33
- },
36
+ }),
34
37
  hint: exo.hint,
35
38
  correction: exo.correction,
36
39
  identifiers: {
@@ -1 +1 @@
1
- {"version":3,"file":"ohmicConductorOrGenerator.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/electricity/ohmicConductorOrGenerator.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAMlC,KAAK,WAAW,GAAG,EAAE,CAAC;AA6FtB,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAgB3D,CAAC"}
1
+ {"version":3,"file":"ohmicConductorOrGenerator.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/electricity/ohmicConductorOrGenerator.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAMlC,KAAK,WAAW,GAAG,EAAE,CAAC;AAkGtB,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAgB3D,CAAC"}
@@ -11,9 +11,9 @@ const getOhmicConductorOrGeneratorQuestion = () => {
11
11
  const question = {
12
12
  answer: exo.answer,
13
13
  instruction: exo.instruction,
14
- commands: exo.ggb.commands,
15
- coords: [8, 40, -5, 30],
16
- options: exo.ggb.getOptions(),
14
+ ggbOptions: exo.ggb.getOptions({
15
+ coords: [8, 40, -5, 30],
16
+ }),
17
17
  keys: [],
18
18
  hint: exo.hint,
19
19
  correction: exo.correction,
@@ -58,8 +58,18 @@ const getGgb = (type) => {
58
58
  points.push(`Point({${x},${y}})`);
59
59
  }
60
60
  return type === "Générateur"
61
- ? new geogebraConstructor_1.GeogebraConstructor([`Function(${Math.pow(10, 15)}/x^10,1,${(0, randint_1.randint)(40, 51)})`].concat(points), { axisLabels: ["$\\tiny I(A)$", "$\\tiny U(V)$"] })
62
- : new geogebraConstructor_1.GeogebraConstructor([`Function(0.00000001*x^6,1,${(0, randint_1.randint)(40, 51)})`].concat(points), { axisLabels: ["$\\tiny I(A)$", "$\\tiny U(V)$"] });
61
+ ? new geogebraConstructor_1.GeogebraConstructor({
62
+ commands: [
63
+ `Function(${Math.pow(10, 15)}/x^10,1,${(0, randint_1.randint)(40, 51)})`,
64
+ ].concat(points),
65
+ xAxis: { label: "$\\tiny I(A)$" },
66
+ yAxis: { label: "$\\tiny U(V)$" },
67
+ })
68
+ : new geogebraConstructor_1.GeogebraConstructor({
69
+ commands: [`Function(0.00000001*x^6,1,${(0, randint_1.randint)(40, 51)})`].concat(points),
70
+ xAxis: { label: "$\\tiny I(A)$" },
71
+ yAxis: { label: "$\\tiny U(V)$" },
72
+ });
63
73
  };
64
74
  const getHint = (type) => {
65
75
  return type === "Générateur"
@@ -1 +1 @@
1
- {"version":3,"file":"calculateNormalOrFrictionForce.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/forces/calculateNormalOrFrictionForce.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AA8FF,eAAO,MAAM,8BAA8B,EAAE,QAAQ,CAAC,WAAW,CAgBhE,CAAC"}
1
+ {"version":3,"file":"calculateNormalOrFrictionForce.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/forces/calculateNormalOrFrictionForce.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AA6FF,eAAO,MAAM,8BAA8B,EAAE,QAAQ,CAAC,WAAW,CAgBhE,CAAC"}
@@ -16,7 +16,6 @@ const getCalculateNormalOrFrictionForceQuestion = () => {
16
16
  instruction: exo.instruction,
17
17
  hint: exo.hint,
18
18
  correction: exo.correction,
19
- coords: [-2, 10, -2, 10],
20
19
  keys: [],
21
20
  answerFormat: "tex",
22
21
  identifiers: { mass: exo.mass, isAsking: exo.isAsking },
@@ -1 +1 @@
1
- {"version":3,"file":"proportionnalityCoeffFromLine.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/math/proportionnalityCoeffFromLine.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AA0EF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,WAAW,CAe/D,CAAC"}
1
+ {"version":3,"file":"proportionnalityCoeffFromLine.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/math/proportionnalityCoeffFromLine.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AA2EF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,WAAW,CAe/D,CAAC"}
@@ -29,18 +29,19 @@ const getProportionnalityCoeffFromLineQuestion = () => {
29
29
  `f(x) = (${aString}) * x + (${bString})`,
30
30
  `SetColor(f, "${(0, colors_1.randomColor)()}")`,
31
31
  ];
32
- const ggb = new geogebraConstructor_1.GeogebraConstructor(commands, {
33
- isGridSimple: true,
34
- axisLabels: ["$x$", "$y$"],
32
+ const ggb = new geogebraConstructor_1.GeogebraConstructor({
33
+ xAxis: { label: "$x$" },
34
+ yAxis: { label: "$y$" },
35
+ commands,
35
36
  });
36
37
  const answer = aTree.toTex();
37
38
  const question = {
38
39
  instruction: "Déterminer le coefficient de proportionnalité entre $y$ et $x$ : ",
39
40
  answer,
40
41
  keys: [],
41
- commands: ggb.commands,
42
- coords: ggb.getAdaptedCoords({ xMin, xMax, yMin, yMax }),
43
- options: ggb.getOptions(),
42
+ ggbOptions: ggb.getOptions({
43
+ coords: ggb.getAdaptedCoords({ xMin, xMax, yMin, yMax }),
44
+ }),
44
45
  answerFormat: "tex",
45
46
  identifiers: { xA, xB, yA, yB },
46
47
  };
@@ -1 +1 @@
1
- {"version":3,"file":"elongationReading.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/mecanicalWaves/elongationReading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAYlC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AA4FF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAanD,CAAC"}
1
+ {"version":3,"file":"elongationReading.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/mecanicalWaves/elongationReading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAYlC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AA6FF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAanD,CAAC"}