math-exercises 2.0.30 → 2.0.31
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.
|
@@ -75,8 +75,8 @@ const getGraphicInequationQuestion = () => {
|
|
|
75
75
|
const yMax = Math.max(...splinePoints.map((point) => point[1]));
|
|
76
76
|
const intervalsNodes = intervals.map((i) => new intervalNode_1.IntervalNode(new numberNode_1.NumberNode(i.a), new numberNode_1.NumberNode(i.b), i.closure));
|
|
77
77
|
const answer = intervalsNodes.length === 1
|
|
78
|
-
? `S
|
|
79
|
-
: `S
|
|
78
|
+
? `S=\\ ${intervalsNodes[0].toTex()}`
|
|
79
|
+
: `S=\\ ${new unionIntervalNode_1.UnionIntervalNode(intervalsNodes).toTex()}`;
|
|
80
80
|
const commands = [
|
|
81
81
|
`S =Spline(${splinePoints
|
|
82
82
|
.map((point) => `(${point[0]},${point[1]})`)
|
|
@@ -118,11 +118,11 @@ const getPropositions = (n, { answer, intervals, splinePoints, yValue }) => {
|
|
|
118
118
|
const propositions = [];
|
|
119
119
|
(0, exercise_1.addValidProp)(propositions, answer);
|
|
120
120
|
(0, exercise_1.tryToAddWrongProp)(propositions, `S=\\varnothing`);
|
|
121
|
-
(0, exercise_1.tryToAddWrongProp)(propositions, `S
|
|
121
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, `S=\\ ${new intervalNode_1.IntervalNode(new numberNode_1.NumberNode(splinePoints[0][0]), new numberNode_1.NumberNode(yValue), intervalNode_1.ClosureType.FF).toTex()}`);
|
|
122
122
|
while (propositions.length < n) {
|
|
123
123
|
const a = (0, randint_1.randint)(-9, 3);
|
|
124
124
|
const b = (0, randint_1.randint)(3, 10, [a]);
|
|
125
|
-
(0, exercise_1.tryToAddWrongProp)(propositions, `S
|
|
125
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, `S=\\ ${new intervalNode_1.IntervalNode(new numberNode_1.NumberNode(a), new numberNode_1.NumberNode(b), intervalNode_1.ClosureType.FF).toTex()}`);
|
|
126
126
|
}
|
|
127
127
|
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
128
128
|
};
|
|
@@ -49,7 +49,7 @@ class InequationSolutionNode {
|
|
|
49
49
|
return `S={${this.intervalSolution.toMathjs()}}`;
|
|
50
50
|
}
|
|
51
51
|
toTex() {
|
|
52
|
-
return `S
|
|
52
|
+
return `S=\\ ${this.intervalSolution.toTex()}`;
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
exports.InequationSolutionNode = InequationSolutionNode;
|