math-exercises 3.0.52 → 3.0.53

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 (141) hide show
  1. package/lib/exercises/math/calcul/fractions/fractionAndIntegerDivision.d.ts.map +1 -1
  2. package/lib/exercises/math/calcul/fractions/fractionAndIntegerDivision.js +0 -2
  3. package/lib/exercises/math/calcul/fractions/fractionAndIntegerProduct.d.ts.map +1 -1
  4. package/lib/exercises/math/calcul/fractions/fractionAndIntegerProduct.js +0 -2
  5. package/lib/exercises/math/calcul/fractions/fractionsDivision.d.ts.map +1 -1
  6. package/lib/exercises/math/calcul/fractions/fractionsDivision.js +0 -2
  7. package/lib/exercises/math/calcul/fractions/fractionsSum.d.ts.map +1 -1
  8. package/lib/exercises/math/calcul/fractions/fractionsSum.js +0 -2
  9. package/lib/exercises/math/calcul/mentalCaluls/mentalAddAndSub.d.ts.map +1 -1
  10. package/lib/exercises/math/calcul/mentalCaluls/mentalAddAndSub.js +0 -12
  11. package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplications.d.ts.map +1 -1
  12. package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplications.js +0 -12
  13. package/lib/exercises/math/calcul/mentalCaluls/mentalPercentage.d.ts.map +1 -1
  14. package/lib/exercises/math/calcul/mentalCaluls/mentalPercentage.js +0 -13
  15. package/lib/exercises/math/calcul/operations/operationsPrioritiesParenthesis.d.ts.map +1 -1
  16. package/lib/exercises/math/calcul/operations/operationsPrioritiesParenthesis.js +0 -2
  17. package/lib/exercises/math/calculLitteral/equation/binomialsTrinomialsProposedSolutions.d.ts.map +1 -1
  18. package/lib/exercises/math/calculLitteral/equation/binomialsTrinomialsProposedSolutions.js +0 -2
  19. package/lib/exercises/math/calculLitteral/equation/equa4.d.ts.map +1 -1
  20. package/lib/exercises/math/calculLitteral/equation/equa4.js +0 -2
  21. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq2.d.ts.map +1 -1
  22. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq2.js +4 -4
  23. package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.d.ts.map +1 -1
  24. package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.js +0 -2
  25. package/lib/exercises/math/calculLitteral/simplifying/evaluateExpression.d.ts.map +1 -1
  26. package/lib/exercises/math/calculLitteral/simplifying/evaluateExpression.js +0 -2
  27. package/lib/exercises/math/functions/affines/affineExpressionFromTwoImages.d.ts.map +1 -1
  28. package/lib/exercises/math/functions/affines/affineExpressionFromTwoImages.js +0 -2
  29. package/lib/exercises/math/functions/affines/affineExpressionReading.d.ts.map +1 -1
  30. package/lib/exercises/math/functions/affines/affineExpressionReading.js +3 -2
  31. package/lib/exercises/math/functions/affines/interceptReading.d.ts.map +1 -1
  32. package/lib/exercises/math/functions/affines/interceptReading.js +47 -18
  33. package/lib/exercises/math/functions/affines/leadingCoefficientCalculV2.d.ts.map +1 -1
  34. package/lib/exercises/math/functions/affines/leadingCoefficientCalculV2.js +46 -13
  35. package/lib/exercises/math/geometry/cartesian/cartesianFromTwoPoints.d.ts +9 -0
  36. package/lib/exercises/math/geometry/cartesian/cartesianFromTwoPoints.d.ts.map +1 -0
  37. package/lib/exercises/math/geometry/cartesian/cartesianFromTwoPoints.js +162 -0
  38. package/lib/exercises/math/geometry/cartesian/cartesianFromVectorAndPoint.d.ts +10 -0
  39. package/lib/exercises/math/geometry/cartesian/cartesianFromVectorAndPoint.d.ts.map +1 -0
  40. package/lib/exercises/math/geometry/cartesian/cartesianFromVectorAndPoint.js +161 -0
  41. package/lib/exercises/math/geometry/cartesian/directionVector.d.ts +4 -2
  42. package/lib/exercises/math/geometry/cartesian/directionVector.d.ts.map +1 -1
  43. package/lib/exercises/math/geometry/cartesian/directionVector.js +110 -79
  44. package/lib/exercises/math/geometry/cartesian/directionVectorEquation.d.ts.map +1 -1
  45. package/lib/exercises/math/geometry/cartesian/drawAlineInGGB.d.ts.map +1 -1
  46. package/lib/exercises/math/geometry/cartesian/drawAlineInGGB.js +18 -2
  47. package/lib/exercises/math/geometry/cartesian/index.d.ts +2 -0
  48. package/lib/exercises/math/geometry/cartesian/index.d.ts.map +1 -1
  49. package/lib/exercises/math/geometry/cartesian/index.js +2 -0
  50. package/lib/exercises/math/geometry/cartesian/pointCoordinates.d.ts.map +1 -1
  51. package/lib/exercises/math/geometry/cartesian/pointCoordinates.js +0 -2
  52. package/lib/exercises/math/geometry/cartesian/pointCoordinatesNoAxisNumbers.d.ts.map +1 -1
  53. package/lib/exercises/math/geometry/cartesian/pointCoordinatesNoAxisNumbers.js +0 -2
  54. package/lib/exercises/math/geometry/cartesian/pointCoordinatesNoOrthonorm.d.ts.map +1 -1
  55. package/lib/exercises/math/geometry/cartesian/pointCoordinatesNoOrthonorm.js +0 -2
  56. package/lib/exercises/math/geometry/lines/aAndBFromReductEquation.d.ts +9 -0
  57. package/lib/exercises/math/geometry/lines/aAndBFromReductEquation.d.ts.map +1 -0
  58. package/lib/exercises/math/geometry/lines/aAndBFromReductEquation.js +108 -0
  59. package/lib/exercises/math/geometry/lines/directorVectorFromAnother.d.ts +9 -0
  60. package/lib/exercises/math/geometry/lines/directorVectorFromAnother.d.ts.map +1 -0
  61. package/lib/exercises/math/geometry/lines/directorVectorFromAnother.js +122 -0
  62. package/lib/exercises/math/geometry/lines/directorVectorFromReductEquation.d.ts +9 -0
  63. package/lib/exercises/math/geometry/lines/directorVectorFromReductEquation.d.ts.map +1 -0
  64. package/lib/exercises/math/geometry/lines/directorVectorFromReductEquation.js +121 -0
  65. package/lib/exercises/math/geometry/lines/drawLineFromCartesianEquation.d.ts +9 -0
  66. package/lib/exercises/math/geometry/lines/drawLineFromCartesianEquation.d.ts.map +1 -0
  67. package/lib/exercises/math/geometry/lines/drawLineFromCartesianEquation.js +115 -0
  68. package/lib/exercises/math/geometry/lines/index.d.ts +5 -0
  69. package/lib/exercises/math/geometry/lines/index.d.ts.map +1 -1
  70. package/lib/exercises/math/geometry/lines/index.js +6 -0
  71. package/lib/exercises/math/geometry/lines/reductEquationFindY.d.ts +10 -0
  72. package/lib/exercises/math/geometry/lines/reductEquationFindY.d.ts.map +1 -0
  73. package/lib/exercises/math/geometry/lines/reductEquationFindY.js +105 -0
  74. package/lib/exercises/math/geometry/lines/reductEquationFromTwoPoints.d.ts +10 -0
  75. package/lib/exercises/math/geometry/lines/reductEquationFromTwoPoints.d.ts.map +1 -0
  76. package/lib/exercises/math/geometry/lines/reductEquationFromTwoPoints.js +149 -0
  77. package/lib/exercises/math/geometry/lines/reductEquationReading.d.ts +8 -0
  78. package/lib/exercises/math/geometry/lines/reductEquationReading.d.ts.map +1 -0
  79. package/lib/exercises/math/geometry/lines/reductEquationReading.js +142 -0
  80. package/lib/exercises/math/geometry/perimeters/squarePerimeter.d.ts.map +1 -1
  81. package/lib/exercises/math/geometry/perimeters/squarePerimeter.js +0 -2
  82. package/lib/exercises/math/geometry/vectors/alignementViaColinearity.d.ts.map +1 -1
  83. package/lib/exercises/math/geometry/vectors/alignementViaColinearity.js +78 -15
  84. package/lib/exercises/math/geometry/vectors/determinant.js +1 -1
  85. package/lib/exercises/math/geometry/vectors/lineFromDirectorVector.d.ts.map +1 -1
  86. package/lib/exercises/math/geometry/vectors/lineFromDirectorVector.js +117 -76
  87. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductViaCos.js +1 -1
  88. package/lib/exercises/math/powers/calculateNegativePower.d.ts.map +1 -1
  89. package/lib/exercises/math/powers/calculateNegativePower.js +0 -2
  90. package/lib/exercises/math/powers/calculatePower.d.ts.map +1 -1
  91. package/lib/exercises/math/powers/calculatePower.js +0 -2
  92. package/lib/exercises/math/powers/decimalToScientific.d.ts.map +1 -1
  93. package/lib/exercises/math/powers/decimalToScientific.js +0 -15
  94. package/lib/exercises/math/powers/scientificToDecimal.d.ts.map +1 -1
  95. package/lib/exercises/math/powers/scientificToDecimal.js +0 -15
  96. package/lib/exercises/math/primitive/logarithmePrimitive.js +1 -1
  97. package/lib/exercises/math/probaStat/index.d.ts +1 -0
  98. package/lib/exercises/math/probaStat/index.d.ts.map +1 -1
  99. package/lib/exercises/math/probaStat/index.js +1 -0
  100. package/lib/exercises/math/probaStat/randomVariable/index.d.ts +5 -0
  101. package/lib/exercises/math/probaStat/randomVariable/index.d.ts.map +1 -0
  102. package/lib/exercises/math/probaStat/randomVariable/index.js +4 -0
  103. package/lib/exercises/math/probaStat/randomVariable/isTableProbabilityLaw.d.ts +10 -0
  104. package/lib/exercises/math/probaStat/randomVariable/isTableProbabilityLaw.d.ts.map +1 -0
  105. package/lib/exercises/math/probaStat/randomVariable/isTableProbabilityLaw.js +81 -0
  106. package/lib/exercises/math/probaStat/randomVariable/randomVariableAverage.d.ts +9 -0
  107. package/lib/exercises/math/probaStat/randomVariable/randomVariableAverage.d.ts.map +1 -0
  108. package/lib/exercises/math/probaStat/randomVariable/randomVariableAverage.js +95 -0
  109. package/lib/exercises/math/probaStat/randomVariable/randomVariableStandardDeviation.d.ts +9 -0
  110. package/lib/exercises/math/probaStat/randomVariable/randomVariableStandardDeviation.d.ts.map +1 -0
  111. package/lib/exercises/math/probaStat/randomVariable/randomVariableStandardDeviation.js +106 -0
  112. package/lib/exercises/math/probaStat/randomVariable/randomVariableVariance.d.ts +9 -0
  113. package/lib/exercises/math/probaStat/randomVariable/randomVariableVariance.d.ts.map +1 -0
  114. package/lib/exercises/math/probaStat/randomVariable/randomVariableVariance.js +105 -0
  115. package/lib/index.d.ts +42 -2
  116. package/lib/index.d.ts.map +1 -1
  117. package/lib/math/geometry/angle.js +5 -5
  118. package/lib/math/geometry/line.d.ts +3 -2
  119. package/lib/math/geometry/line.d.ts.map +1 -1
  120. package/lib/math/geometry/line.js +32 -20
  121. package/lib/math/geometry/vector.d.ts +5 -0
  122. package/lib/math/geometry/vector.d.ts.map +1 -1
  123. package/lib/math/geometry/vector.js +18 -1
  124. package/lib/math/probability/randomVariable.d.ts +15 -0
  125. package/lib/math/probability/randomVariable.d.ts.map +1 -0
  126. package/lib/math/probability/randomVariable.js +56 -0
  127. package/lib/playground.d.ts.map +1 -1
  128. package/lib/playground.js +7 -0
  129. package/lib/tree/nodes/equations/equalNode.d.ts +2 -2
  130. package/lib/tree/nodes/equations/equalNode.d.ts.map +1 -1
  131. package/lib/tree/nodes/equations/equalNode.js +2 -2
  132. package/lib/tree/nodes/node.d.ts +1 -0
  133. package/lib/tree/nodes/node.d.ts.map +1 -1
  134. package/lib/tree/nodes/numbers/numberNode.d.ts.map +1 -1
  135. package/lib/tree/nodes/numbers/numberNode.js +6 -2
  136. package/lib/tree/nodes/operators/binomialCoefficientNode.d.ts +2 -1
  137. package/lib/tree/nodes/operators/binomialCoefficientNode.d.ts.map +1 -1
  138. package/lib/tree/nodes/operators/binomialCoefficientNode.js +7 -2
  139. package/lib/tree/parsers/latexParser.d.ts.map +1 -1
  140. package/lib/tree/parsers/latexParser.js +6 -0
  141. package/package.json +1 -1
@@ -0,0 +1,162 @@
1
+ import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
2
+ import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
3
+ import { Line, LineConstructor } from "../../../../math/geometry/line.js";
4
+ import { PointConstructor, } from "../../../../math/geometry/point.js";
5
+ import { Vector, VectorConstructor, } from "../../../../math/geometry/vector.js";
6
+ import { gcd } from "../../../../math/utils/arithmetic/gcd.js";
7
+ import { isEqualNode, } from "../../../../tree/nodes/equations/equalNode.js";
8
+ import { opposite } from "../../../../tree/nodes/functions/oppositeNode.js";
9
+ import { add } from "../../../../tree/nodes/operators/addNode.js";
10
+ import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
11
+ import { VariableNode } from "../../../../tree/nodes/variables/variableNode.js";
12
+ import { parseLatex } from "../../../../tree/parsers/latexParser.js";
13
+ import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
14
+ const getPropositions = (n, { answer }) => {
15
+ const propositions = [];
16
+ addValidProp(propositions, answer);
17
+ while (propositions.length < n) {
18
+ const line = LineConstructor.random();
19
+ tryToAddWrongProp(propositions, line.getCartesianEquation().toTex());
20
+ }
21
+ return shuffleProps(propositions, n);
22
+ };
23
+ const getAnswer = (identifiers) => {
24
+ const { pointBIdentifiers, pointIdentifiers } = identifiers;
25
+ const point = PointConstructor.fromIdentifiers(pointIdentifiers);
26
+ const pointB = PointConstructor.fromIdentifiers(pointBIdentifiers);
27
+ const line = new Line(point, pointB);
28
+ return line.getCartesianEquation().toTex();
29
+ };
30
+ const getInstruction = (identifiers) => {
31
+ const { pointBIdentifiers, pointIdentifiers } = identifiers;
32
+ const point = PointConstructor.fromIdentifiers(pointIdentifiers);
33
+ const pointB = PointConstructor.fromIdentifiers(pointBIdentifiers);
34
+ return `Soit $d$ une droite passant par les points $${point.toTexWithCoords()}$ et $${pointB.toTexWithCoords()}$.
35
+
36
+ Déterminer une équation cartésienne de $d$.`;
37
+ };
38
+ const getHint = (identifiers) => {
39
+ const genVec = new Vector("u", opposite("b"), new VariableNode("a"));
40
+ return `Une droite de vecteur directeur $${genVec.toTexWithCoords()}$ admet une équation cartésienne de la forme :
41
+
42
+ $$
43
+ ax+by+c = 0
44
+ $$
45
+
46
+ On remarque que $\\overrightarrow{AB}$ est un vecteur directeur de $d$.
47
+
48
+ Puis, on peut ensuite utiliser les coordonnées d'un point de la droite pour déterminer $c$.`;
49
+ };
50
+ const getCorrection = (identifiers) => {
51
+ const { pointBIdentifiers, pointIdentifiers } = identifiers;
52
+ const point = PointConstructor.fromIdentifiers(pointIdentifiers);
53
+ const pointB = PointConstructor.fromIdentifiers(pointBIdentifiers);
54
+ const vector = VectorConstructor.fromPoints(point, pointB);
55
+ const nonCEq = add(add(multiply(vector.y, "x"), multiply(opposite(vector.x), "y")), "c").simplify({
56
+ forbidFactorize: true,
57
+ });
58
+ const line = LineConstructor.fromPointAndVector(point, vector);
59
+ const { a, b, c } = line.toCartesianCoeffs();
60
+ const [aEv, bEv, cEv] = [a.evaluate(), b.evaluate(), c.evaluate()];
61
+ const allNeg = aEv < 0 && bEv < 0 && cEv < 0;
62
+ const pgcd = gcd(aEv, bEv, cEv);
63
+ const hasSimplified = allNeg || pgcd !== 1;
64
+ return `Puisque $${vector.toTexWithCoords()}$ est un vecteur directeur de $d$, cette dernière admet une équation cartésienne de la forme :
65
+
66
+ $$
67
+ ${nonCEq.toTex()}=0
68
+ $$
69
+
70
+ Pour déterminer $c$, on peut ensuite utiliser le fait que le point $${point.toTexWithCoords()}$ appartient à $d$ :
71
+
72
+ $$
73
+ ${nonCEq.toDetailedEvaluation({ x: point.x, y: point.y }).toTex()}=0
74
+ $$
75
+
76
+ On en déduit que $c=${c.simplify().toTex()}$.
77
+
78
+ Ainsi, une équation cartésienne de $d$ est :
79
+
80
+ $$
81
+ ${add(add(multiply(a, "x"), multiply(b, "y")), c)
82
+ .simplify({
83
+ forbidFactorize: true,
84
+ })
85
+ .toTex()}=0
86
+ $$
87
+
88
+ ${hasSimplified
89
+ ? `On peut alors simplifier cette équation en la divisant par $${allNeg ? opposite(pgcd).toTex() : pgcd}$ :
90
+
91
+ $$
92
+ ${getAnswer(identifiers)}
93
+ $$`
94
+ : ""}
95
+ `;
96
+ };
97
+ const getKeys = (identifiers) => {
98
+ return ["x", "y", "equal"];
99
+ };
100
+ const isAnswerValid = (ans, { answer, ...identifiers }) => {
101
+ try {
102
+ const parsed = parseLatex(ans);
103
+ if (!isEqualNode(parsed))
104
+ return false;
105
+ const { pointBIdentifiers, pointIdentifiers } = identifiers;
106
+ const point = PointConstructor.fromIdentifiers(pointIdentifiers);
107
+ const pointB = PointConstructor.fromIdentifiers(pointBIdentifiers);
108
+ return (parsed.leftChild
109
+ .toDetailedEvaluation({
110
+ x: point.x,
111
+ y: point.y,
112
+ })
113
+ .simplify()
114
+ .toTex() === "0" &&
115
+ parsed.leftChild
116
+ .toDetailedEvaluation({
117
+ x: pointB.x,
118
+ y: pointB.y,
119
+ })
120
+ .simplify()
121
+ .toTex() === "0");
122
+ }
123
+ catch (err) {
124
+ return handleVEAError(err);
125
+ }
126
+ };
127
+ const getCartesianFromTwoPointsQuestion = (ops) => {
128
+ const points = PointConstructor.randomDifferent(2, { names: ["A", "B"] });
129
+ const identifiers = {
130
+ pointIdentifiers: points[0].toIdentifiers(),
131
+ pointBIdentifiers: points[1].toIdentifiers(),
132
+ };
133
+ return getQuestionFromIdentifiers(identifiers);
134
+ };
135
+ const getQuestionFromIdentifiers = (identifiers) => {
136
+ return {
137
+ answer: getAnswer(identifiers),
138
+ instruction: getInstruction(identifiers),
139
+ keys: getKeys(identifiers),
140
+ answerFormat: "tex",
141
+ identifiers,
142
+ hint: getHint(identifiers),
143
+ correction: getCorrection(identifiers),
144
+ };
145
+ };
146
+ export const cartesianFromTwoPoints = {
147
+ id: "cartesianFromTwoPoints",
148
+ label: "Déterminer l'équation cartésienne d'une droite en connaissant deux points",
149
+ isSingleStep: true,
150
+ generator: (nb, opts) => getDistinctQuestions(() => getCartesianFromTwoPointsQuestion(opts), nb),
151
+ qcmTimer: 60,
152
+ freeTimer: 60,
153
+ getPropositions,
154
+ isAnswerValid,
155
+ subject: "Mathématiques",
156
+ getInstruction,
157
+ getHint,
158
+ getCorrection,
159
+ getAnswer,
160
+ getQuestionFromIdentifiers,
161
+ hasHintAndCorrection: true,
162
+ };
@@ -0,0 +1,10 @@
1
+ import { Exercise } from "../../../../exercises/exercise.js";
2
+ import { PointIdentifiers } from "../../../../math/geometry/point.js";
3
+ import { VectorIdentifiers } from "../../../../math/geometry/vector.js";
4
+ type Identifiers = {
5
+ vectorIdentifiers: VectorIdentifiers;
6
+ pointIdentifiers: PointIdentifiers;
7
+ };
8
+ export declare const cartesianFromVectorAndPoint: Exercise<Identifiers>;
9
+ export {};
10
+ //# sourceMappingURL=cartesianFromVectorAndPoint.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cartesianFromVectorAndPoint.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/cartesianFromVectorAndPoint.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EAGL,gBAAgB,EACjB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAGL,iBAAiB,EAClB,MAAM,+BAA+B,CAAC;AAevC,KAAK,WAAW,GAAG;IACjB,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,gBAAgB,EAAE,gBAAgB,CAAC;CACpC,CAAC;AAuJF,eAAO,MAAM,2BAA2B,EAAE,QAAQ,CAAC,WAAW,CAqB7D,CAAC"}
@@ -0,0 +1,161 @@
1
+ import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
2
+ import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
3
+ import { LineConstructor } from "../../../../math/geometry/line.js";
4
+ import { PointConstructor, } from "../../../../math/geometry/point.js";
5
+ import { Vector, VectorConstructor, } from "../../../../math/geometry/vector.js";
6
+ import { gcd } from "../../../../math/utils/arithmetic/gcd.js";
7
+ import { isEqualNode, } from "../../../../tree/nodes/equations/equalNode.js";
8
+ import { opposite } from "../../../../tree/nodes/functions/oppositeNode.js";
9
+ import { add } from "../../../../tree/nodes/operators/addNode.js";
10
+ import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
11
+ import { VariableNode } from "../../../../tree/nodes/variables/variableNode.js";
12
+ import { parseLatex } from "../../../../tree/parsers/latexParser.js";
13
+ import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
14
+ const getPropositions = (n, { answer }) => {
15
+ const propositions = [];
16
+ addValidProp(propositions, answer);
17
+ while (propositions.length < n) {
18
+ const line = LineConstructor.random();
19
+ tryToAddWrongProp(propositions, line.getCartesianEquation().toTex());
20
+ }
21
+ return shuffleProps(propositions, n);
22
+ };
23
+ const getAnswer = (identifiers) => {
24
+ const { vectorIdentifiers, pointIdentifiers } = identifiers;
25
+ const point = PointConstructor.fromIdentifiers(pointIdentifiers);
26
+ const vector = VectorConstructor.fromIdentifiers(vectorIdentifiers);
27
+ const line = LineConstructor.fromPointAndVector(point, vector);
28
+ return line.getCartesianEquation().toTex();
29
+ };
30
+ const getInstruction = (identifiers) => {
31
+ const { vectorIdentifiers, pointIdentifiers } = identifiers;
32
+ const point = PointConstructor.fromIdentifiers(pointIdentifiers);
33
+ const vector = VectorConstructor.fromIdentifiers(vectorIdentifiers);
34
+ return `Soit $d$ une droite de vecteur directeur $${vector.toTexWithCoords()}$ et passant par le point $${point.toTexWithCoords()}$.
35
+
36
+ Déterminer une équation cartésienne de $d$.`;
37
+ };
38
+ const getHint = (identifiers) => {
39
+ const genVec = new Vector("u", opposite("b"), new VariableNode("a"));
40
+ return `Une droite de vecteur directeur $${genVec.toTexWithCoords()}$ admet une équation cartésienne de la forme :
41
+
42
+ $$
43
+ ax+by+c = 0
44
+ $$
45
+
46
+ On peut ensuite utiliser les coordonnées d'un point de la droite pour déterminer $c$.`;
47
+ };
48
+ const getCorrection = (identifiers) => {
49
+ const { vectorIdentifiers, pointIdentifiers } = identifiers;
50
+ const point = PointConstructor.fromIdentifiers(pointIdentifiers);
51
+ const vector = VectorConstructor.fromIdentifiers(vectorIdentifiers);
52
+ const nonCEq = add(add(multiply(vector.y, "x"), multiply(opposite(vector.x), "y")), "c").simplify({
53
+ forbidFactorize: true,
54
+ });
55
+ const line = LineConstructor.fromPointAndVector(point, vector);
56
+ const { a, b, c } = line.toCartesianCoeffs();
57
+ const [aEv, bEv, cEv] = [a.evaluate(), b.evaluate(), c.evaluate()];
58
+ const allNeg = aEv < 0 && bEv < 0 && cEv < 0;
59
+ const pgcd = gcd(aEv, bEv, cEv);
60
+ const hasSimplified = allNeg || pgcd !== 1;
61
+ return `Puisque $${vector.toTexWithCoords()}$ est un vecteur directeur de $d$, cette dernière admet une équation cartésienne de la forme :
62
+
63
+ $$
64
+ ${nonCEq.toTex()}=0
65
+ $$
66
+
67
+ Pour déterminer $c$, on peut ensuite utiliser le fait que le point $${point.toTexWithCoords()}$ appartient à $d$ :
68
+
69
+ $$
70
+ ${nonCEq.toDetailedEvaluation({ x: point.x, y: point.y }).toTex()}=0
71
+ $$
72
+
73
+ On en déduit que $c=${c.simplify().toTex()}$.
74
+
75
+ Ainsi, une équation cartésienne de $d$ est :
76
+
77
+ $$
78
+ ${add(add(multiply(a, "x"), multiply(b, "y")), c)
79
+ .simplify({
80
+ forbidFactorize: true,
81
+ })
82
+ .toTex()}=0
83
+ $$
84
+
85
+ ${hasSimplified
86
+ ? `On peut alors simplifier cette équation en la divisant par $${allNeg ? opposite(pgcd).toTex() : pgcd}$ :
87
+
88
+ $$
89
+ ${getAnswer(identifiers)}
90
+ $$`
91
+ : ""}
92
+ `;
93
+ };
94
+ const getKeys = (identifiers) => {
95
+ return ["x", "y", "equal"];
96
+ };
97
+ const isAnswerValid = (ans, { answer, ...identifiers }) => {
98
+ try {
99
+ const parsed = parseLatex(ans);
100
+ if (!isEqualNode(parsed))
101
+ return false;
102
+ const { vectorIdentifiers, pointIdentifiers } = identifiers;
103
+ const point = PointConstructor.fromIdentifiers(pointIdentifiers);
104
+ const vector = VectorConstructor.fromIdentifiers(vectorIdentifiers);
105
+ const secondPoint = vector.getEndPoint(point);
106
+ return (parsed.leftChild
107
+ .toDetailedEvaluation({
108
+ x: point.x,
109
+ y: point.y,
110
+ })
111
+ .simplify()
112
+ .toTex() === "0" &&
113
+ parsed.leftChild
114
+ .toDetailedEvaluation({
115
+ x: secondPoint.x,
116
+ y: secondPoint.y,
117
+ })
118
+ .simplify()
119
+ .toTex() === "0");
120
+ }
121
+ catch (err) {
122
+ return handleVEAError(err);
123
+ }
124
+ };
125
+ const getCartesianFromVectorAndPointQuestion = (ops) => {
126
+ const point = PointConstructor.random("A");
127
+ const vector = VectorConstructor.random("u");
128
+ const identifiers = {
129
+ pointIdentifiers: point.toIdentifiers(),
130
+ vectorIdentifiers: vector.toIdentifiers(),
131
+ };
132
+ return getQuestionFromIdentifiers(identifiers);
133
+ };
134
+ const getQuestionFromIdentifiers = (identifiers) => {
135
+ return {
136
+ answer: getAnswer(identifiers),
137
+ instruction: getInstruction(identifiers),
138
+ keys: getKeys(identifiers),
139
+ answerFormat: "tex",
140
+ identifiers,
141
+ hint: getHint(identifiers),
142
+ correction: getCorrection(identifiers),
143
+ };
144
+ };
145
+ export const cartesianFromVectorAndPoint = {
146
+ id: "cartesianFromVectorAndPoint",
147
+ label: "Déterminer l'équation cartésienne d'une droite en connaissant un point et un vecteur directeur",
148
+ isSingleStep: true,
149
+ generator: (nb, opts) => getDistinctQuestions(() => getCartesianFromVectorAndPointQuestion(opts), nb),
150
+ qcmTimer: 60,
151
+ freeTimer: 60,
152
+ getPropositions,
153
+ isAnswerValid,
154
+ subject: "Mathématiques",
155
+ getInstruction,
156
+ getHint,
157
+ getCorrection,
158
+ getAnswer,
159
+ getQuestionFromIdentifiers,
160
+ hasHintAndCorrection: true,
161
+ };
@@ -1,7 +1,9 @@
1
1
  import { Exercise } from "../../../../exercises/exercise.js";
2
2
  type Identifiers = {
3
- xValue: number;
4
- yValue: number;
3
+ x1: number;
4
+ x2: number;
5
+ y1: number;
6
+ y2: number;
5
7
  };
6
8
  export declare const directionVector: Exercise<Identifiers>;
7
9
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"directionVector.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/directionVector.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,6BAA6B,CAAC;AAOrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAyIF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAcjD,CAAC"}
1
+ {"version":3,"file":"directionVector.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/directionVector.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAgBT,MAAM,6BAA6B,CAAC;AAcrC,KAAK,WAAW,GAAG;IAIjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAkJF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAejD,CAAC"}
@@ -1,50 +1,69 @@
1
1
  import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
2
2
  import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
3
+ import { randomColor } from "../../../../geogebra/colors.js";
3
4
  import { GeogebraConstructor } from "../../../../geogebra/geogebraConstructor.js";
4
- import { Vector } from "../../../../math/geometry/vector.js";
5
+ import { Vector, VectorConstructor } from "../../../../math/geometry/vector.js";
5
6
  import { gcd } from "../../../../math/utils/arithmetic/gcd.js";
6
7
  import { randint } from "../../../../math/utils/random/randint.js";
7
- function parseVector(input) {
8
- const tex = input.replace("\\left", "");
9
- const latex = tex.replace("\\right", "");
10
- const regex = /\((-?\d+)\s*[;,]\s*(-?\d+)\)/;
11
- const match = latex.match(regex);
12
- if (match && match.length === 3) {
13
- return {
14
- x: parseInt(match[1], 10),
15
- y: parseInt(match[2], 10),
16
- };
17
- }
18
- return null;
19
- }
20
- function normalizeVector(x, y) {
21
- const divisor = gcd(Math.abs(x), Math.abs(y));
22
- let newX = x / divisor;
23
- let newY = y / divisor;
24
- if (newX < 0) {
25
- newX = -newX;
26
- newY = -newY;
27
- }
28
- return { x: newX, y: newY };
29
- }
30
- const getDirectionVectorQuestion = () => {
31
- let x1 = randint(-8, 8);
32
- let x2 = randint(-8, 8);
33
- while (x2 === x1) {
34
- x2 = randint(-8, 8);
35
- }
36
- let y1 = randint(-8, 8);
37
- let y2 = randint(-8, 8);
38
- while (y2 === y1) {
8
+ import { isBinomialCoefficientNode } from "../../../../tree/nodes/operators/binomialCoefficientNode.js";
9
+ import { substract } from "../../../../tree/nodes/operators/substractNode.js";
10
+ import { parseAlgebraic } from "../../../../tree/parsers/latexParser.js";
11
+ import { vectorParser } from "../../../../tree/parsers/vectorParser.js";
12
+ import { doWhile } from "../../../../utils/doWhile.js";
13
+ import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
14
+ const rebuildIdentifiers = (oldIds) => {
15
+ if (oldIds.x1 !== undefined)
16
+ return oldIds;
17
+ const xValue = oldIds.xValue;
18
+ const yValue = oldIds.yValue;
19
+ let x1, x2, y1, y2;
20
+ do {
21
+ x1 = randint(-8, 8);
22
+ x2 = randint(-8, 8, [x1]);
23
+ y1 = randint(-8, 8);
39
24
  y2 = randint(-8, 8);
40
- }
41
- const rawXValue = x2 - x1;
42
- const rawYValue = y2 - y1;
43
- const { x: xValue, y: yValue } = normalizeVector(rawXValue, rawYValue);
44
- const vector = new Vector("v", xValue.toTree(), yValue.toTree());
45
- const instruction = `Lire les coordonnées d'un vecteur directeur de la droite représentée ci-dessous :`;
25
+ } while (x2 - x1 !== xValue || y2 - y1 !== yValue);
26
+ return {
27
+ x1,
28
+ x2,
29
+ y1,
30
+ y2,
31
+ };
32
+ };
33
+ const getInstruction = (identifiers) => {
34
+ const instruction = `Lire les coordonnées d'un vecteur directeur de la droite $d$ représentée ci-dessous :`;
35
+ return instruction;
36
+ };
37
+ const getVector = (identifiers) => {
38
+ const { x1, x2, y1, y2 } = identifiers;
39
+ const vector = new Vector("v", (x2 - x1).toTree(), (y2 - y1).toTree());
40
+ return vector;
41
+ };
42
+ const getAnswer = (identifiers) => {
43
+ return getVector(identifiers).toBinomCoords().toTex();
44
+ };
45
+ const getHint = (identifiers) => {
46
+ return "On repère deux points appartenant à la droite. Le vecteur formé par ces deux points est un vecteur directeur de la droite.";
47
+ };
48
+ const getCorrection = (identifiers) => {
49
+ const { x1, x2, y1, y2 } = identifiers;
50
+ const vector = new Vector("AB", substract(x2, x1), substract(y2, y1));
51
+ const simp = vector.simplify();
52
+ return `On lit graphiquement que la droite passe par les points $A(${x1}; ${y1})$ et $B(${x2};${y2})$.
53
+
54
+ Le vecteur $\\overrightarrow{AB}$ est donc un vecteur directeur de $d$.
55
+
56
+ Ses coordonnées sont :
57
+
58
+ $$
59
+ ${vector.toTexWithBinomCoords()}=${simp.toBinomCoords().toTex()}
60
+ $$`;
61
+ };
62
+ const getGGBOptions = (identifiers) => {
63
+ const { x1, x2, y1, y2 } = identifiers;
46
64
  const commands = [
47
65
  `line = Line((${x1}, ${y1}), (${x2}, ${y2}))`,
66
+ `SetColor(line, "${randomColor()}")`,
48
67
  `SetFixed(line, true)`,
49
68
  ];
50
69
  const xMin = Math.min(x1, x2);
@@ -54,64 +73,73 @@ const getDirectionVectorQuestion = () => {
54
73
  const ggb = new GeogebraConstructor({
55
74
  commands,
56
75
  });
76
+ return ggb.getOptions({
77
+ coords: ggb.getAdaptedCoords({ xMin, xMax, yMin, yMax }),
78
+ });
79
+ };
80
+ const getDirectionVectorQuestion = () => {
81
+ let x1, x2, y1, y2;
82
+ do {
83
+ x1 = randint(-8, 8);
84
+ x2 = randint(-8, 8, [x1]);
85
+ y1 = randint(-8, 8);
86
+ y2 = randint(-8, 8);
87
+ } while (gcd(x2 - x1, y2 - y1) !== 1);
88
+ if (x1 > x2) {
89
+ [x1, x2] = [x2, x1];
90
+ [y1, y2] = [y2, y1];
91
+ }
92
+ const identifiers = { x1, x2, y1, y2 };
93
+ return getQuestionFromIdentifiers(identifiers);
94
+ };
95
+ const getQuestionFromIdentifiers = (identifiers) => {
57
96
  const question = {
58
- answer: vector.toInlineCoordsTex(),
59
- instruction,
60
- ggbOptions: ggb.getOptions({
61
- coords: [xMin - 10, xMax + 10, yMin - 10, yMax + 10],
62
- }),
63
- keys: ["semicolon", "x", "y"],
97
+ answer: getAnswer(identifiers),
98
+ instruction: getInstruction(identifiers),
99
+ ggbOptions: getGGBOptions(identifiers),
100
+ keys: ["binom", "semicolon"],
64
101
  answerFormat: "tex",
65
- identifiers: { xValue, yValue },
102
+ identifiers,
103
+ hint: getHint(identifiers),
104
+ correction: getCorrection(identifiers),
66
105
  };
67
106
  return question;
68
107
  };
69
- const getPropositions = (n, { answer, xValue, yValue }) => {
108
+ const getPropositions = (n, { answer, ...identifiers }) => {
70
109
  const propositions = [];
71
110
  addValidProp(propositions, answer);
72
- const vector = new Vector("v", xValue.toTree(), yValue.toTree());
73
- const wrongAnswer1 = new Vector("v", (xValue - 1).toTree(), (yValue - 1).toTree());
74
- const wrongAnswer2 = new Vector("v", (xValue + 1).toTree(), (yValue + 1).toTree());
75
- const wrongAnswer3 = new Vector("v", yValue.toTree(), xValue.toTree());
76
- if (wrongAnswer1.isColinear(vector) === false) {
77
- tryToAddWrongProp(propositions, wrongAnswer1.toInlineCoordsTex());
78
- }
79
- if (wrongAnswer2.isColinear(vector) === false) {
80
- tryToAddWrongProp(propositions, wrongAnswer2.toInlineCoordsTex());
81
- }
82
- if (wrongAnswer3.isColinear(vector) === false) {
83
- tryToAddWrongProp(propositions, wrongAnswer3.toInlineCoordsTex());
84
- }
111
+ const vector = getVector(identifiers);
85
112
  while (propositions.length < n) {
86
- const randomX = randint(-5, 5);
87
- const randomY = randint(-5, 5);
88
- const { x: wrongX, y: wrongY } = normalizeVector(randomX, randomY);
89
- const wrongAnswer = new Vector("v", wrongX.toTree(), wrongY.toTree());
90
- if (wrongAnswer.isColinear(vector) === false) {
91
- tryToAddWrongProp(propositions, wrongAnswer.toInlineCoordsTex());
92
- }
113
+ const fakeVec = doWhile(() => VectorConstructor.random("v"), (v) => vector.isColinear(v));
114
+ tryToAddWrongProp(propositions, fakeVec.toBinomCoords().toTex());
93
115
  }
94
116
  return shuffleProps(propositions, n);
95
117
  };
96
- const isAnswerValid = (ans, { answer, xValue, yValue }) => {
97
- const parsed = parseVector(ans);
98
- if (!parsed) {
99
- return false;
118
+ const isAnswerValid = (ans, { answer, ...identifiers }) => {
119
+ try {
120
+ const solVector = getVector(identifiers);
121
+ if (ans.includes("binom")) {
122
+ const parsed = parseAlgebraic(ans);
123
+ if (!isBinomialCoefficientNode(parsed))
124
+ return false;
125
+ const vec = new Vector("u", parsed.leftChild, parsed.rightChild);
126
+ return solVector.isColinear(vec);
127
+ }
128
+ else {
129
+ const vec = vectorParser(ans);
130
+ if (!vec)
131
+ return false;
132
+ return solVector.isColinear(vec);
133
+ }
100
134
  }
101
- const { x, y } = parsed;
102
- const correctVector = new Vector("v", xValue.toTree(), yValue.toTree());
103
- const studentVector = new Vector("v", x.toTree(), y.toTree());
104
- if (!studentVector.isColinear(correctVector)) {
105
- return false;
135
+ catch (err) {
136
+ return handleVEAError(err);
106
137
  }
107
- return true;
108
138
  };
109
139
  export const directionVector = {
110
140
  id: "directionVector",
111
141
  label: "Lire les coordonnées d'un vecteur directeur d'une droite",
112
- levels: ["2nde"],
113
142
  isSingleStep: true,
114
- sections: ["Géométrie cartésienne"],
115
143
  generator: (nb) => getDistinctQuestions(getDirectionVectorQuestion, nb),
116
144
  qcmTimer: 60,
117
145
  freeTimer: 60,
@@ -119,4 +147,7 @@ export const directionVector = {
119
147
  isAnswerValid,
120
148
  subject: "Mathématiques",
121
149
  hasGeogebra: true,
150
+ getQuestionFromIdentifiers,
151
+ hasHintAndCorrection: true,
152
+ rebuildIdentifiers,
122
153
  };
@@ -1 +1 @@
1
- {"version":3,"file":"directionVectorEquation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/directionVectorEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,CAAC,EAAE,MAAM,CAAC;CAEX,CAAC;AA+HF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAgBzD,CAAC"}
1
+ {"version":3,"file":"directionVectorEquation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/directionVectorEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,CAAC,EAAE,MAAM,CAAC;CAEX,CAAC;AA+HF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAgBzD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"drawAlineInGGB.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/drawAlineInGGB.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,6BAA6B,CAAC;AAYrC,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AA6EF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAehD,CAAC"}
1
+ {"version":3,"file":"drawAlineInGGB.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/drawAlineInGGB.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAYrC,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAoGF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAehD,CAAC"}
@@ -8,6 +8,17 @@ import { arrayEqual } from "../../../../utils/arrays/arrayEqual.js";
8
8
  import { deleteObjectNamesFromAnswer } from "../../../../geogebra/deleteObjectNamesFromAnswer.js";
9
9
  import { GeogebraConstructor } from "../../../../geogebra/geogebraConstructor.js";
10
10
  import { approxEqual } from "../../../../geogebra/parsers/approxEqual.js";
11
+ const getHint = (identifiers) => {
12
+ return `Détermine un premier point par lequel passe la droite en utilisant l'ordonnée à l'origine de la droite. Puis, à l'aide du coefficient directeur, détermine un deuxième point à partir du premier point.`;
13
+ };
14
+ const getCorrection = (identifiers) => {
15
+ const { correctA, correctB } = identifiers;
16
+ return `L'ordonnée à l'origine de la droite est $${correctB}$. La droite passe donc par le point de coordonnées $(0;${correctB})$.
17
+
18
+ Puis, le coefficient directeur de $d$ est $${correctA}$. Donc, à partir du point $(0;${correctB})$, en se déplaçant d'une abscisse vers la droite, les ordonnées ${correctA < 0 ? "diminuent" : "augmentent"} de $${correctA}$ unité(s). La droite passe donc par le point de coordonnées $(1; ${correctA})$.
19
+
20
+ On place donc les deux points de coordonnées $(0; ${correctB})$ et $(1; ${correctA})$, puis on les relie.`;
21
+ };
11
22
  const getInstruction = (identifiers) => {
12
23
  const { correctA, correctB } = identifiers;
13
24
  const f = new Affine(correctA, correctB);
@@ -38,6 +49,9 @@ const getGGBAnswer = (identifiers) => {
38
49
  const getDrawAlineInGgbQuestion = () => {
39
50
  const f = AffineConstructor.random({ min: -3, max: 3 });
40
51
  const identifiers = { correctA: f.a, correctB: f.b };
52
+ return getQuestionFromIdentifiers(identifiers);
53
+ };
54
+ const getQuestionFromIdentifiers = (identifiers) => {
41
55
  const question = {
42
56
  ggbAnswer: getGGBAnswer(identifiers),
43
57
  instruction: getInstruction(identifiers),
@@ -45,6 +59,8 @@ const getDrawAlineInGgbQuestion = () => {
45
59
  answerFormat: "tex",
46
60
  studentGgbOptions: getStudentGGBOptions(identifiers),
47
61
  identifiers,
62
+ hint: getHint(identifiers),
63
+ correction: getCorrection(identifiers),
48
64
  };
49
65
  return question;
50
66
  };
@@ -73,10 +89,8 @@ const getPoint = (command, pointName) => {
73
89
  export const drawAlineInGGB = {
74
90
  id: "drawAlineInGGB",
75
91
  label: "Tracer une droite à partir de son équation réduite",
76
- levels: ["2nde"],
77
92
  isSingleStep: true,
78
93
  answerType: "GGB",
79
- sections: ["Géométrie cartésienne"],
80
94
  generator: (nb) => getDistinctQuestions(getDrawAlineInGgbQuestion, nb),
81
95
  ggbTimer: 60,
82
96
  isGGBAnswerValid,
@@ -84,4 +98,6 @@ export const drawAlineInGGB = {
84
98
  getGGBAnswer,
85
99
  getInstruction,
86
100
  getStudentGGBOptions,
101
+ getQuestionFromIdentifiers,
102
+ hasHintAndCorrection: true,
87
103
  };
@@ -11,4 +11,6 @@ export * from "./readAbscissOnLine.js";
11
11
  export * from "./readAbscissOnSemiLine.js";
12
12
  export * from "./placeAbscissOnLine.js";
13
13
  export * from "./placeAbscissOnSemiLine.js";
14
+ export * from "./cartesianFromVectorAndPoint.js";
15
+ export * from "./cartesianFromTwoPoints.js";
14
16
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,eAAe,CAAC;AAC9B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oCAAoC,CAAC;AAEnD,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,eAAe,CAAC;AAC9B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oCAAoC,CAAC;AAEnD,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kCAAkC,CAAC;AACjD,cAAc,6BAA6B,CAAC"}