math-exercises 3.0.150 → 3.0.151
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.
- package/lib/exercises/math/calcul/arithmetics/primeNumbersAffirmations.js +1 -1
- package/lib/exercises/math/calculLitteral/equation/equa1.d.ts +4 -1
- package/lib/exercises/math/calculLitteral/equation/equa1.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/equa1.js +27 -7
- package/lib/exercises/math/calculLitteral/equation/equa2.d.ts +1 -0
- package/lib/exercises/math/calculLitteral/equation/equa2.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/equa2.js +18 -1
- package/lib/exercises/math/calculLitteral/equation/equa3.d.ts +4 -1
- package/lib/exercises/math/calculLitteral/equation/equa3.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/equa3.js +26 -6
- package/lib/exercises/math/calculLitteral/equation/equa4.d.ts +4 -1
- package/lib/exercises/math/calculLitteral/equation/equa4.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/equa4.js +27 -7
- package/lib/exercises/math/calculLitteral/equation/firstDegree/equa1.d.ts +14 -0
- package/lib/exercises/math/calculLitteral/equation/firstDegree/equa1.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/equation/firstDegree/equa1.js +129 -0
- package/lib/exercises/math/calculLitteral/equation/firstDegree/equa2.d.ts +18 -0
- package/lib/exercises/math/calculLitteral/equation/firstDegree/equa2.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/equation/firstDegree/equa2.js +167 -0
- package/lib/exercises/math/calculLitteral/equation/firstDegree/equa3.d.ts +15 -0
- package/lib/exercises/math/calculLitteral/equation/firstDegree/equa3.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/equation/firstDegree/equa3.js +129 -0
- package/lib/exercises/math/calculLitteral/equation/firstDegree/equa4.d.ts +16 -0
- package/lib/exercises/math/calculLitteral/equation/firstDegree/equa4.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/equation/firstDegree/equa4.js +124 -0
- package/lib/exercises/math/calculLitteral/equation/firstDegree/firstDegreeEquationIntType1.d.ts +9 -0
- package/lib/exercises/math/calculLitteral/equation/firstDegree/firstDegreeEquationIntType1.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/equation/firstDegree/firstDegreeEquationIntType1.js +107 -0
- package/lib/exercises/math/calculLitteral/equation/firstDegree/firstDegreeEquationIntType2.d.ts +10 -0
- package/lib/exercises/math/calculLitteral/equation/firstDegree/firstDegreeEquationIntType2.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/equation/firstDegree/firstDegreeEquationIntType2.js +108 -0
- package/lib/exercises/math/calculLitteral/equation/firstDegree/firstDegreeEquationIntType3.d.ts +11 -0
- package/lib/exercises/math/calculLitteral/equation/firstDegree/firstDegreeEquationIntType3.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/equation/firstDegree/firstDegreeEquationIntType3.js +104 -0
- package/lib/exercises/math/calculLitteral/equation/firstDegree/index.d.ts +8 -0
- package/lib/exercises/math/calculLitteral/equation/firstDegree/index.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/equation/firstDegree/index.js +7 -0
- package/lib/exercises/math/calculLitteral/equation/index.d.ts +1 -7
- package/lib/exercises/math/calculLitteral/equation/index.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/index.js +1 -7
- package/lib/exercises/math/dataRepresentations/histogram/etendueHistogram.d.ts +8 -0
- package/lib/exercises/math/dataRepresentations/histogram/etendueHistogram.d.ts.map +1 -0
- package/lib/exercises/math/dataRepresentations/histogram/etendueHistogram.js +175 -0
- package/lib/exercises/math/dataRepresentations/histogram/histogramCommenting.d.ts +9 -0
- package/lib/exercises/math/dataRepresentations/histogram/histogramCommenting.d.ts.map +1 -0
- package/lib/exercises/math/dataRepresentations/histogram/histogramCommenting.js +250 -0
- package/lib/exercises/math/dataRepresentations/histogram/histogramFillDataTableFromHistogramData.d.ts +9 -0
- package/lib/exercises/math/dataRepresentations/histogram/histogramFillDataTableFromHistogramData.d.ts.map +1 -0
- package/lib/exercises/math/dataRepresentations/histogram/histogramFillDataTableFromHistogramData.js +173 -0
- package/lib/exercises/math/dataRepresentations/histogram/histogramIsSameData.d.ts +14 -0
- package/lib/exercises/math/dataRepresentations/histogram/histogramIsSameData.d.ts.map +1 -0
- package/lib/exercises/math/dataRepresentations/histogram/histogramIsSameData.js +232 -0
- package/lib/exercises/math/dataRepresentations/histogram/histogramReading.d.ts +9 -0
- package/lib/exercises/math/dataRepresentations/histogram/histogramReading.d.ts.map +1 -0
- package/lib/exercises/math/dataRepresentations/histogram/histogramReading.js +163 -0
- package/lib/exercises/math/dataRepresentations/histogram/index.d.ts +6 -0
- package/lib/exercises/math/dataRepresentations/histogram/index.d.ts.map +1 -0
- package/lib/exercises/math/dataRepresentations/histogram/index.js +5 -0
- package/lib/exercises/math/dataRepresentations/index.d.ts +1 -1
- package/lib/exercises/math/dataRepresentations/index.d.ts.map +1 -1
- package/lib/exercises/math/dataRepresentations/index.js +1 -1
- package/lib/exercises/math/functions/affines/leadingCoeffAndOriginOrdinate.d.ts +4 -1
- package/lib/exercises/math/functions/affines/leadingCoeffAndOriginOrdinate.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/leadingCoeffAndOriginOrdinate.js +19 -4
- package/lib/exercises/math/functions/affines/leadingCoefficient.d.ts +1 -0
- package/lib/exercises/math/functions/affines/leadingCoefficient.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/leadingCoefficient.js +13 -1
- package/lib/exercises/math/functions/affines/recognizeAffineGraph.d.ts +4 -1
- package/lib/exercises/math/functions/affines/recognizeAffineGraph.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/recognizeAffineGraph.js +19 -4
- package/lib/exercises/math/geometry/euclidian/pythagoreOrThales.d.ts +4 -1
- package/lib/exercises/math/geometry/euclidian/pythagoreOrThales.d.ts.map +1 -1
- package/lib/exercises/math/geometry/euclidian/pythagoreOrThales.js +18 -3
- package/lib/exercises/math/geometry/triangles/index.d.ts +1 -0
- package/lib/exercises/math/geometry/triangles/index.d.ts.map +1 -1
- package/lib/exercises/math/geometry/triangles/index.js +1 -0
- package/lib/exercises/math/geometry/triangles/similar/index.d.ts +4 -0
- package/lib/exercises/math/geometry/triangles/similar/index.d.ts.map +1 -0
- package/lib/exercises/math/geometry/triangles/similar/index.js +3 -0
- package/lib/exercises/math/geometry/triangles/similar/isSimilarTrianglesWithAngles.d.ts +10 -0
- package/lib/exercises/math/geometry/triangles/similar/isSimilarTrianglesWithAngles.d.ts.map +1 -0
- package/lib/exercises/math/geometry/triangles/similar/isSimilarTrianglesWithAngles.js +122 -0
- package/lib/exercises/math/geometry/triangles/similar/isSimilarTrianglesWrtSideLengths.d.ts +15 -0
- package/lib/exercises/math/geometry/triangles/similar/isSimilarTrianglesWrtSideLengths.d.ts.map +1 -0
- package/lib/exercises/math/geometry/triangles/similar/isSimilarTrianglesWrtSideLengths.js +351 -0
- package/lib/exercises/math/geometry/triangles/similar/placeSegmentsOfSimilarTriangle.d.ts +11 -0
- package/lib/exercises/math/geometry/triangles/similar/placeSegmentsOfSimilarTriangle.d.ts.map +1 -0
- package/lib/exercises/math/geometry/triangles/similar/placeSegmentsOfSimilarTriangle.js +311 -0
- package/lib/exercises/math/probaStat/basicProbas/calculateProbaFromProbaLaw.d.ts +10 -0
- package/lib/exercises/math/probaStat/basicProbas/calculateProbaFromProbaLaw.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/basicProbas/calculateProbaFromProbaLaw.js +128 -0
- package/lib/exercises/math/probaStat/basicProbas/findEffectifFromProba.d.ts +9 -0
- package/lib/exercises/math/probaStat/basicProbas/findEffectifFromProba.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/basicProbas/findEffectifFromProba.js +109 -0
- package/lib/exercises/math/probaStat/basicProbas/index.d.ts +2 -0
- package/lib/exercises/math/probaStat/basicProbas/index.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/basicProbas/index.js +2 -0
- package/lib/exercises/math/spaceGeometry/index.d.ts +1 -0
- package/lib/exercises/math/spaceGeometry/index.d.ts.map +1 -1
- package/lib/exercises/math/spaceGeometry/index.js +1 -0
- package/lib/exercises/math/spaceGeometry/sections/areaOfConeSection.d.ts +14 -0
- package/lib/exercises/math/spaceGeometry/sections/areaOfConeSection.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/sections/areaOfConeSection.js +439 -0
- package/lib/exercises/math/spaceGeometry/sections/areaOfCylinderSection.d.ts +14 -0
- package/lib/exercises/math/spaceGeometry/sections/areaOfCylinderSection.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/sections/areaOfCylinderSection.js +548 -0
- package/lib/exercises/math/spaceGeometry/sections/areaOfRectangularPrismSection.d.ts +11 -0
- package/lib/exercises/math/spaceGeometry/sections/areaOfRectangularPrismSection.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/sections/areaOfRectangularPrismSection.js +360 -0
- package/lib/exercises/math/spaceGeometry/sections/areaOfSphereSection.d.ts +9 -0
- package/lib/exercises/math/spaceGeometry/sections/areaOfSphereSection.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/sections/areaOfSphereSection.js +272 -0
- package/lib/exercises/math/spaceGeometry/sections/index.d.ts +9 -0
- package/lib/exercises/math/spaceGeometry/sections/index.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/sections/index.js +8 -0
- package/lib/exercises/math/spaceGeometry/sections/recognizeSectionsOfCone.d.ts +11 -0
- package/lib/exercises/math/spaceGeometry/sections/recognizeSectionsOfCone.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/sections/recognizeSectionsOfCone.js +266 -0
- package/lib/exercises/math/spaceGeometry/sections/recognizeSectionsOfCylinder.d.ts +11 -0
- package/lib/exercises/math/spaceGeometry/sections/recognizeSectionsOfCylinder.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/sections/recognizeSectionsOfCylinder.js +236 -0
- package/lib/exercises/math/spaceGeometry/sections/recognizeSectionsOfRectangularPrism.d.ts +7 -0
- package/lib/exercises/math/spaceGeometry/sections/recognizeSectionsOfRectangularPrism.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/sections/recognizeSectionsOfRectangularPrism.js +92 -0
- package/lib/exercises/math/spaceGeometry/sections/recognizeSectionsOfSphereOrBall.d.ts +9 -0
- package/lib/exercises/math/spaceGeometry/sections/recognizeSectionsOfSphereOrBall.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/sections/recognizeSectionsOfSphereOrBall.js +236 -0
- package/lib/exercises/pc/mathExosInPC.d.ts +4 -4
- package/lib/exercises/pc/mathExosInPC.d.ts.map +1 -1
- package/lib/exercises/pc/mathExosInPC.js +4 -4
- package/lib/index.d.ts +153 -44
- package/lib/index.d.ts.map +1 -1
- package/lib/math/geometry/spacePoint.d.ts +10 -0
- package/lib/math/geometry/spacePoint.d.ts.map +1 -1
- package/lib/math/geometry/spacePoint.js +13 -0
- package/lib/tree/nodes/operators/substractNode.d.ts +1 -0
- package/lib/tree/nodes/operators/substractNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/substractNode.js +6 -0
- package/package.json +1 -1
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { randint } from "../../../../math/utils/random/randint.js";
|
|
4
|
+
import { coinFlip } from "../../../../utils/alea/coinFlip.js";
|
|
5
|
+
import { probaFlip } from "../../../../utils/alea/probaFlip.js";
|
|
6
|
+
import { random, randomMany } from "../../../../utils/alea/random.js";
|
|
7
|
+
const getInstruction = (identifiers) => {
|
|
8
|
+
const { strOfX, radius, isDiameterGiven } = identifiers;
|
|
9
|
+
return `Parmi les propositions suivantes, lesquelles peuvent être des sections planes ${strOfX} de ${isDiameterGiven ? "diamètre" : "rayon"} $${(isDiameterGiven ? 2 * radius : radius).frenchify()}\\ \\textrm{cm}$ ?`;
|
|
10
|
+
};
|
|
11
|
+
const getHint = (identifiers) => {
|
|
12
|
+
const { strOfX } = identifiers;
|
|
13
|
+
if (strOfX === "d'une sphère") {
|
|
14
|
+
return "Est-ce qu'une sphère est pleine ?";
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
return "Est-ce qu'une boule est creuse ?";
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
const getCorrection = (identifiers) => {
|
|
21
|
+
const { strOfX, radius } = identifiers;
|
|
22
|
+
if (strOfX === "d'une sphère") {
|
|
23
|
+
return `On s'intéresse aux sections planes ${strOfX} de rayon $${radius} \\ \\textrm{cm}$.
|
|
24
|
+
Les sections planes possibles sont :
|
|
25
|
+
- un point (quand le plan est tangent à la sphère)
|
|
26
|
+
- tous les cercles de rayon inférieur ou égal à $${radius} \\ \\textrm{cm}$.
|
|
27
|
+
|
|
28
|
+
La sphère est "creuse", les sections planes sont "creuses" elles aussi.`;
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
return `On s'intéresse aux sections planes ${strOfX} de rayon $${radius} \\ \\textrm{cm}$.
|
|
32
|
+
Les sections planes possibles sont :
|
|
33
|
+
- un point (quand le plan est tangent à la boule)
|
|
34
|
+
- tous les disques de rayon inférieur ou égal à $${radius} \\ \\textrm{cm}$.
|
|
35
|
+
|
|
36
|
+
La boule est "pleine", les sections planes sont "pleines" elles aussi.`;
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
const getPropositions = (n, { answer, ...identifiers }) => {
|
|
40
|
+
const { strOfX, radius } = identifiers;
|
|
41
|
+
const propositions = [];
|
|
42
|
+
if (strOfX === "d'une sphère") {
|
|
43
|
+
const validPool = [
|
|
44
|
+
"un point",
|
|
45
|
+
//circle=radius
|
|
46
|
+
random([
|
|
47
|
+
`un cercle de rayon $${radius} \\ \\textrm{cm}$`,
|
|
48
|
+
`un cercle de diamètre $${2 * radius} \\ \\textrm{cm}$`,
|
|
49
|
+
]),
|
|
50
|
+
//circle<radius
|
|
51
|
+
random([
|
|
52
|
+
`un cercle de rayon $${randint(1, radius)} \\ \\textrm{cm}$`,
|
|
53
|
+
`un cercle de diamètre $${2 * randint(1, radius)} \\ \\textrm{cm}$`,
|
|
54
|
+
]),
|
|
55
|
+
//rare
|
|
56
|
+
...(probaFlip(0.02)
|
|
57
|
+
? [
|
|
58
|
+
random([
|
|
59
|
+
`un cercle de rayon $1,5 \\ \\textrm{cm}$`,
|
|
60
|
+
`un cercle de diamètre $3 \\ \\textrm{cm}$`,
|
|
61
|
+
]),
|
|
62
|
+
]
|
|
63
|
+
: []),
|
|
64
|
+
];
|
|
65
|
+
const invalidPool = [
|
|
66
|
+
//circle>radius
|
|
67
|
+
random([
|
|
68
|
+
`un cercle de rayon $${randint(radius + 1, 2 * radius)} \\ \\textrm{cm}$`,
|
|
69
|
+
`un cercle de diamètre $${2 * randint(radius + 1, 2 * radius)} \\ \\textrm{cm}$`,
|
|
70
|
+
]),
|
|
71
|
+
//disk=radius
|
|
72
|
+
random([
|
|
73
|
+
`un disque de rayon $${radius} \\ \\textrm{cm}$`,
|
|
74
|
+
`un disque de diamètre $${2 * radius} \\ \\textrm{cm}$`,
|
|
75
|
+
]),
|
|
76
|
+
//disk<radius
|
|
77
|
+
random([
|
|
78
|
+
`un disque de rayon $${randint(1, radius)} \\ \\textrm{cm}$`,
|
|
79
|
+
`un disque de diamètre $${2 * randint(1, radius)} \\ \\textrm{cm}$`,
|
|
80
|
+
]),
|
|
81
|
+
//disk>radius
|
|
82
|
+
random([
|
|
83
|
+
`un disque de rayon $${randint(radius + 1, 2 * radius)} \\ \\textrm{cm}$`,
|
|
84
|
+
`un disque de diamètre $${2 * randint(radius + 1, 2 * radius)} \\ \\textrm{cm}$`,
|
|
85
|
+
]),
|
|
86
|
+
//rare
|
|
87
|
+
...(probaFlip(0.02)
|
|
88
|
+
? [
|
|
89
|
+
random([
|
|
90
|
+
`un disque de rayon $1,5 \\ \\textrm{cm}$`,
|
|
91
|
+
`un disque de diamètre $3 \\ \\textrm{cm}$`,
|
|
92
|
+
]),
|
|
93
|
+
]
|
|
94
|
+
: []),
|
|
95
|
+
];
|
|
96
|
+
const invalidMiscPool = ["une droite", "une ellipse", "un cône"];
|
|
97
|
+
if (coinFlip() && validPool.length === 4) {
|
|
98
|
+
//jackpot
|
|
99
|
+
validPool.forEach((str) => {
|
|
100
|
+
addValidProp(propositions, str, "raw");
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
const nbValid = randint(1, validPool.length + 1);
|
|
105
|
+
const nbInvalid = n - nbValid;
|
|
106
|
+
randomMany(validPool, nbValid).forEach((str) => {
|
|
107
|
+
addValidProp(propositions, str, "raw");
|
|
108
|
+
});
|
|
109
|
+
if (probaFlip(0.2)) {
|
|
110
|
+
randomMany([...invalidPool, random(invalidMiscPool)], nbInvalid).forEach((str) => {
|
|
111
|
+
tryToAddWrongProp(propositions, str, "raw");
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
else {
|
|
115
|
+
randomMany(invalidPool, nbInvalid).forEach((str) => {
|
|
116
|
+
tryToAddWrongProp(propositions, str, "raw");
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
else {
|
|
122
|
+
const validPool = [
|
|
123
|
+
"un point",
|
|
124
|
+
//disk=radius
|
|
125
|
+
random([
|
|
126
|
+
`un disque de rayon $${radius} \\ \\textrm{cm}$`,
|
|
127
|
+
`un disque de diamètre $${2 * radius} \\ \\textrm{cm}$`,
|
|
128
|
+
]),
|
|
129
|
+
//disk<radius
|
|
130
|
+
random([
|
|
131
|
+
`un disque de rayon $${randint(1, radius)} \\ \\textrm{cm}$`,
|
|
132
|
+
`un disque de diamètre $${2 * randint(1, radius)} \\ \\textrm{cm}$`,
|
|
133
|
+
]),
|
|
134
|
+
//rare
|
|
135
|
+
...(probaFlip(0.02)
|
|
136
|
+
? [
|
|
137
|
+
random([
|
|
138
|
+
`un disque de rayon $1,5 \\ \\textrm{cm}$`,
|
|
139
|
+
`un disque de diamètre $3 \\ \\textrm{cm}$`,
|
|
140
|
+
]),
|
|
141
|
+
]
|
|
142
|
+
: []),
|
|
143
|
+
];
|
|
144
|
+
const invalidPool = [
|
|
145
|
+
//disk>radius
|
|
146
|
+
random([
|
|
147
|
+
`un disque de rayon $${randint(radius + 1, 2 * radius)} \\ \\textrm{cm}$`,
|
|
148
|
+
`un disque de diamètre $${randint(radius + 1, 2 * radius)} \\ \\textrm{cm}$`,
|
|
149
|
+
]),
|
|
150
|
+
//circle=radius
|
|
151
|
+
random([
|
|
152
|
+
`un cercle de rayon $${radius} \\ \\textrm{cm}$`,
|
|
153
|
+
`un cercle de diamètre $${2 * radius} \\ \\textrm{cm}$`,
|
|
154
|
+
]),
|
|
155
|
+
//circle<radius
|
|
156
|
+
random([
|
|
157
|
+
`un cercle de rayon $${randint(1, radius)} \\ \\textrm{cm}$`,
|
|
158
|
+
`un cercle de diamètre $${2 * randint(1, radius)} \\ \\textrm{cm}$`,
|
|
159
|
+
]),
|
|
160
|
+
//circle>radius
|
|
161
|
+
random([
|
|
162
|
+
`un cercle de rayon $${randint(radius + 1, 2 * radius)} \\ \\textrm{cm}$`,
|
|
163
|
+
`un cercle de diamètre $${2 * randint(radius + 1, 2 * radius)} \\ \\textrm{cm}$`,
|
|
164
|
+
]),
|
|
165
|
+
//rare
|
|
166
|
+
...(probaFlip(0.02)
|
|
167
|
+
? [
|
|
168
|
+
random([
|
|
169
|
+
`un cercle de rayon $1,5 \\ \\textrm{cm}$`,
|
|
170
|
+
`un cercle de diamètre $1,5 \\ \\textrm{cm}$`,
|
|
171
|
+
]),
|
|
172
|
+
]
|
|
173
|
+
: []),
|
|
174
|
+
];
|
|
175
|
+
const invalidMiscPool = ["une droite", "une ellipse", "un cône"];
|
|
176
|
+
if (coinFlip() && validPool.length === 4) {
|
|
177
|
+
//jackpot
|
|
178
|
+
validPool.forEach((str) => {
|
|
179
|
+
addValidProp(propositions, str, "raw");
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
else {
|
|
183
|
+
const nbValid = randint(1, validPool.length + 1);
|
|
184
|
+
const nbInvalid = n - nbValid;
|
|
185
|
+
randomMany(validPool, nbValid).forEach((str) => {
|
|
186
|
+
addValidProp(propositions, str, "raw");
|
|
187
|
+
});
|
|
188
|
+
if (probaFlip(0.2)) {
|
|
189
|
+
randomMany([...invalidPool, random(invalidMiscPool)], nbInvalid).forEach((str) => {
|
|
190
|
+
tryToAddWrongProp(propositions, str, "raw");
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
else {
|
|
194
|
+
randomMany(invalidPool, nbInvalid).forEach((str) => {
|
|
195
|
+
tryToAddWrongProp(propositions, str, "raw");
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
return shuffleProps(propositions, n);
|
|
201
|
+
};
|
|
202
|
+
const getRecognizeSectionsOfSphereOrBallQuestion = () => {
|
|
203
|
+
const strOfX = random(["d'une sphère", "d'une boule"]);
|
|
204
|
+
const radius = randint(5, 21);
|
|
205
|
+
const isDiameterGiven = coinFlip();
|
|
206
|
+
const identifiers = { strOfX, radius, isDiameterGiven };
|
|
207
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
208
|
+
};
|
|
209
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
210
|
+
const question = {
|
|
211
|
+
instruction: getInstruction(identifiers),
|
|
212
|
+
hint: getHint(identifiers),
|
|
213
|
+
correction: getCorrection(identifiers),
|
|
214
|
+
keys: [],
|
|
215
|
+
answerFormat: "raw",
|
|
216
|
+
identifiers,
|
|
217
|
+
};
|
|
218
|
+
return question;
|
|
219
|
+
};
|
|
220
|
+
export const recognizeSectionsOfSphereOrBall = {
|
|
221
|
+
id: "recognizeSectionsOfSphereOrBall",
|
|
222
|
+
connector: "=",
|
|
223
|
+
label: "Reconnaître la nature d'une section de sphère ou de boule",
|
|
224
|
+
isSingleStep: true,
|
|
225
|
+
generator: (nb) => getDistinctQuestions(getRecognizeSectionsOfSphereOrBallQuestion, nb),
|
|
226
|
+
qcmTimer: 60,
|
|
227
|
+
freeTimer: 60,
|
|
228
|
+
getPropositions,
|
|
229
|
+
subject: "Mathématiques",
|
|
230
|
+
getQuestionFromIdentifiers,
|
|
231
|
+
answerType: "QCM",
|
|
232
|
+
isQCM: true,
|
|
233
|
+
getHint,
|
|
234
|
+
getCorrection,
|
|
235
|
+
hasHintAndCorrection: true,
|
|
236
|
+
};
|
|
@@ -7,10 +7,10 @@ export * from "../math/calcul/mentalCaluls/mentalAddAndSub.js";
|
|
|
7
7
|
export { log10PowerSimplifying } from "../math/functions/logarithm/log10PowerSimplifying.js";
|
|
8
8
|
export { log10SumSimplifying } from "../math/functions/logarithm/log10Simplifying.js";
|
|
9
9
|
export { log10PowerEquation } from "../math/functions/logarithm/logPowerEquation.js";
|
|
10
|
-
export * from "../math/calculLitteral/equation/equa1.js";
|
|
11
|
-
export * from "../math/calculLitteral/equation/equa2.js";
|
|
12
|
-
export * from "../math/calculLitteral/equation/equa3.js";
|
|
13
|
-
export * from "../math/calculLitteral/equation/equa4.js";
|
|
10
|
+
export * from "../math/calculLitteral/equation/firstDegree/equa1.js";
|
|
11
|
+
export * from "../math/calculLitteral/equation/firstDegree/equa2.js";
|
|
12
|
+
export * from "../math/calculLitteral/equation/firstDegree/equa3.js";
|
|
13
|
+
export * from "../math/calculLitteral/equation/firstDegree/equa4.js";
|
|
14
14
|
export * from "../math/geometry/vectors/scalarProduct/scalarProductViaCoords.js";
|
|
15
15
|
export * from "../math/geometry/vectors/scalarProduct/scalarProductViaCos.js";
|
|
16
16
|
export * from "../math/geometry/vectors/coordinatesReading.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mathExosInPC.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/mathExosInPC.ts"],"names":[],"mapp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CAAC;AAC1G,OAAO,EAAE,qBAAqB,EAAE,MAAM,mEAAmE,CAAC;AAC1G,OAAO,EAAE,sBAAsB,EAAE,MAAM,oEAAoE,CAAC;AAC5G,cAAc,gDAAgD,CAAC;AAC/D,cAAc,iDAAiD,CAAC"}
|
|
@@ -7,10 +7,10 @@ export * from "../math/calcul/mentalCaluls/mentalAddAndSub.js";
|
|
|
7
7
|
export { log10PowerSimplifying } from "../math/functions/logarithm/log10PowerSimplifying.js";
|
|
8
8
|
export { log10SumSimplifying } from "../math/functions/logarithm/log10Simplifying.js";
|
|
9
9
|
export { log10PowerEquation } from "../math/functions/logarithm/logPowerEquation.js";
|
|
10
|
-
export * from "../math/calculLitteral/equation/equa1.js";
|
|
11
|
-
export * from "../math/calculLitteral/equation/equa2.js";
|
|
12
|
-
export * from "../math/calculLitteral/equation/equa3.js";
|
|
13
|
-
export * from "../math/calculLitteral/equation/equa4.js";
|
|
10
|
+
export * from "../math/calculLitteral/equation/firstDegree/equa1.js";
|
|
11
|
+
export * from "../math/calculLitteral/equation/firstDegree/equa2.js";
|
|
12
|
+
export * from "../math/calculLitteral/equation/firstDegree/equa3.js";
|
|
13
|
+
export * from "../math/calculLitteral/equation/firstDegree/equa4.js";
|
|
14
14
|
export * from "../math/geometry/vectors/scalarProduct/scalarProductViaCoords.js";
|
|
15
15
|
export * from "../math/geometry/vectors/scalarProduct/scalarProductViaCos.js";
|
|
16
16
|
export * from "../math/geometry/vectors/coordinatesReading.js";
|
package/lib/index.d.ts
CHANGED
|
@@ -459,25 +459,6 @@ declare const mathExercises: (Exercise<{
|
|
|
459
459
|
}> | Exercise<{
|
|
460
460
|
a: number;
|
|
461
461
|
b: number;
|
|
462
|
-
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
463
|
-
a: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
464
|
-
b: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
465
|
-
isXRight: boolean;
|
|
466
|
-
aNumberType: string;
|
|
467
|
-
}, {
|
|
468
|
-
aNumberType: string[];
|
|
469
|
-
}> | Exercise<{
|
|
470
|
-
a: number;
|
|
471
|
-
b: number;
|
|
472
|
-
c: number;
|
|
473
|
-
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
474
|
-
a: number;
|
|
475
|
-
b: number;
|
|
476
|
-
c: number;
|
|
477
|
-
d: number;
|
|
478
|
-
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
479
|
-
a: number;
|
|
480
|
-
b: number;
|
|
481
462
|
c: number;
|
|
482
463
|
d: number;
|
|
483
464
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
@@ -488,21 +469,6 @@ declare const mathExercises: (Exercise<{
|
|
|
488
469
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
489
470
|
a: number;
|
|
490
471
|
b: number;
|
|
491
|
-
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
492
|
-
a: number;
|
|
493
|
-
b: number;
|
|
494
|
-
x: number;
|
|
495
|
-
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
496
|
-
a: number;
|
|
497
|
-
x: number;
|
|
498
|
-
b: number;
|
|
499
|
-
c: number;
|
|
500
|
-
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
501
|
-
a: number;
|
|
502
|
-
x: number;
|
|
503
|
-
b: number;
|
|
504
|
-
c: number;
|
|
505
|
-
d: number;
|
|
506
472
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
507
473
|
type: number;
|
|
508
474
|
vars: {
|
|
@@ -566,6 +532,47 @@ declare const mathExercises: (Exercise<{
|
|
|
566
532
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
567
533
|
a: number;
|
|
568
534
|
b: number;
|
|
535
|
+
}, {
|
|
536
|
+
solutionFormat: string;
|
|
537
|
+
}> | Exercise<{
|
|
538
|
+
a: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
539
|
+
b: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
540
|
+
isXRight: boolean;
|
|
541
|
+
aNumberType: string;
|
|
542
|
+
}, {
|
|
543
|
+
aNumberType: string[];
|
|
544
|
+
solutionFormat: string;
|
|
545
|
+
}> | Exercise<{
|
|
546
|
+
a: number;
|
|
547
|
+
b: number;
|
|
548
|
+
c: number;
|
|
549
|
+
}, {
|
|
550
|
+
solutionFormat: string;
|
|
551
|
+
}> | Exercise<{
|
|
552
|
+
a: number;
|
|
553
|
+
b: number;
|
|
554
|
+
c: number;
|
|
555
|
+
d: number;
|
|
556
|
+
}, {
|
|
557
|
+
solutionFormat: string;
|
|
558
|
+
}> | Exercise<{
|
|
559
|
+
a: number;
|
|
560
|
+
b: number;
|
|
561
|
+
x: number;
|
|
562
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
563
|
+
a: number;
|
|
564
|
+
x: number;
|
|
565
|
+
b: number;
|
|
566
|
+
c: number;
|
|
567
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
568
|
+
a: number;
|
|
569
|
+
x: number;
|
|
570
|
+
b: number;
|
|
571
|
+
c: number;
|
|
572
|
+
d: number;
|
|
573
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
574
|
+
a: number;
|
|
575
|
+
b: number;
|
|
569
576
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
570
577
|
a: number;
|
|
571
578
|
b: number;
|
|
@@ -1034,6 +1041,7 @@ declare const mathExercises: (Exercise<{
|
|
|
1034
1041
|
yB: number;
|
|
1035
1042
|
}, {
|
|
1036
1043
|
functionType?: string;
|
|
1044
|
+
coefType?: string;
|
|
1037
1045
|
}> | Exercise<{
|
|
1038
1046
|
xA: number;
|
|
1039
1047
|
xB: number;
|
|
@@ -1065,7 +1073,9 @@ declare const mathExercises: (Exercise<{
|
|
|
1065
1073
|
a: number;
|
|
1066
1074
|
b: number;
|
|
1067
1075
|
isAskingA: boolean;
|
|
1068
|
-
},
|
|
1076
|
+
}, {
|
|
1077
|
+
parameter: string;
|
|
1078
|
+
}> | Exercise<{
|
|
1069
1079
|
xValues: number[];
|
|
1070
1080
|
yValues: number[];
|
|
1071
1081
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
@@ -1119,7 +1129,9 @@ declare const mathExercises: (Exercise<{
|
|
|
1119
1129
|
isAnswer: boolean;
|
|
1120
1130
|
}[];
|
|
1121
1131
|
isLinear: boolean;
|
|
1122
|
-
},
|
|
1132
|
+
}, {
|
|
1133
|
+
functionType: string;
|
|
1134
|
+
}> | Exercise<{
|
|
1123
1135
|
coeffs: number[];
|
|
1124
1136
|
yValue: number;
|
|
1125
1137
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
@@ -2049,7 +2061,9 @@ declare const mathExercises: (Exercise<{
|
|
|
2049
2061
|
isSegmentHeight: boolean;
|
|
2050
2062
|
pointsIdentifiers: import("./math/geometry/point.js").PointIdentifiers[];
|
|
2051
2063
|
lengths: number[];
|
|
2052
|
-
},
|
|
2064
|
+
}, {
|
|
2065
|
+
theorem: string;
|
|
2066
|
+
}> | Exercise<{
|
|
2053
2067
|
point: string;
|
|
2054
2068
|
line: string;
|
|
2055
2069
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
@@ -2174,6 +2188,23 @@ declare const mathExercises: (Exercise<{
|
|
|
2174
2188
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
2175
2189
|
triangleIdentifiers: import("./math/geometry/triangles/triangle.js").TriangleIdentifiers;
|
|
2176
2190
|
angleAsked: number;
|
|
2191
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
2192
|
+
namePoints1: string[];
|
|
2193
|
+
namePoints2: string[];
|
|
2194
|
+
nodeIdsLengths1: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers[];
|
|
2195
|
+
nodeIdsLengths2: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers[];
|
|
2196
|
+
}, {
|
|
2197
|
+
numberTypesForLengths: ("Entier" | "D\u00E9cimal")[];
|
|
2198
|
+
numberTypesForCoeffs: ("Entier" | "D\u00E9cimal" | "Fraction")[];
|
|
2199
|
+
}> | Exercise<{
|
|
2200
|
+
triangleNames: string[];
|
|
2201
|
+
sameAngleValue: number;
|
|
2202
|
+
firstAngleValue: number;
|
|
2203
|
+
secondAngleValue: number;
|
|
2204
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
2205
|
+
triangleIds1: import("./math/geometry/triangles/triangle.js").TriangleIdentifiers;
|
|
2206
|
+
triangleIds2: import("./math/geometry/triangles/triangle.js").TriangleIdentifiers;
|
|
2207
|
+
factor: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
2177
2208
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
2178
2209
|
perimeter: number;
|
|
2179
2210
|
askingX: boolean;
|
|
@@ -2657,6 +2688,13 @@ declare const mathExercises: (Exercise<{
|
|
|
2657
2688
|
max: number;
|
|
2658
2689
|
target: number;
|
|
2659
2690
|
isIncluded: boolean;
|
|
2691
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
2692
|
+
proba: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
2693
|
+
knownEffectif: number;
|
|
2694
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
2695
|
+
xValues: number[];
|
|
2696
|
+
yValues: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers[];
|
|
2697
|
+
atLeastXIndex: number;
|
|
2660
2698
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
2661
2699
|
indexSituation: number;
|
|
2662
2700
|
eventIds: {
|
|
@@ -2892,6 +2930,50 @@ declare const mathExercises: (Exercise<{
|
|
|
2892
2930
|
h: number;
|
|
2893
2931
|
askedPoint: string;
|
|
2894
2932
|
givenPoints: string[];
|
|
2933
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
2934
|
+
strOfX: string;
|
|
2935
|
+
radius: number;
|
|
2936
|
+
isDiameterGiven: boolean;
|
|
2937
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
2938
|
+
radius: number;
|
|
2939
|
+
height: number;
|
|
2940
|
+
isDiameterGiven: boolean;
|
|
2941
|
+
isHollow: boolean;
|
|
2942
|
+
isBaseCircle: boolean;
|
|
2943
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
2944
|
+
radius: number;
|
|
2945
|
+
height: number;
|
|
2946
|
+
isDiameterGiven: boolean;
|
|
2947
|
+
isHollow: boolean;
|
|
2948
|
+
isBaseCircle: boolean;
|
|
2949
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
2950
|
+
nothing: boolean;
|
|
2951
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
2952
|
+
isDiameterGiven: boolean;
|
|
2953
|
+
radius: number;
|
|
2954
|
+
height: number;
|
|
2955
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
2956
|
+
isDiameterGiven: boolean;
|
|
2957
|
+
radius: number;
|
|
2958
|
+
height: number;
|
|
2959
|
+
offset: number;
|
|
2960
|
+
planeType: string;
|
|
2961
|
+
}, {
|
|
2962
|
+
planeTypes: string[];
|
|
2963
|
+
}> | Exercise<{
|
|
2964
|
+
isDiameterGiven: boolean;
|
|
2965
|
+
radius: number;
|
|
2966
|
+
height: number;
|
|
2967
|
+
offset: number;
|
|
2968
|
+
planeType: string;
|
|
2969
|
+
}, {
|
|
2970
|
+
planeTypes: string[];
|
|
2971
|
+
}> | Exercise<{
|
|
2972
|
+
AB: number;
|
|
2973
|
+
AD: number;
|
|
2974
|
+
AE: number;
|
|
2975
|
+
offset: number;
|
|
2976
|
+
planeType: string;
|
|
2895
2977
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
2896
2978
|
sqrtOperand: number;
|
|
2897
2979
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
@@ -3126,10 +3208,6 @@ declare const mathExercises: (Exercise<{
|
|
|
3126
3208
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3127
3209
|
points: number[][];
|
|
3128
3210
|
labels: string[];
|
|
3129
|
-
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3130
|
-
bounds: number[];
|
|
3131
|
-
data: number[];
|
|
3132
|
-
itemAsked: number;
|
|
3133
3211
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3134
3212
|
quartiles: number[];
|
|
3135
3213
|
arrQuartileIndex: (0 | 1 | 2 | 3 | 4)[];
|
|
@@ -3220,6 +3298,30 @@ declare const mathExercises: (Exercise<{
|
|
|
3220
3298
|
}[];
|
|
3221
3299
|
p: number;
|
|
3222
3300
|
}[];
|
|
3301
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3302
|
+
bounds: number[];
|
|
3303
|
+
data: number[];
|
|
3304
|
+
itemAsked: number;
|
|
3305
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3306
|
+
isMax: boolean;
|
|
3307
|
+
bounds: number[];
|
|
3308
|
+
data: number[];
|
|
3309
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3310
|
+
histogram: {
|
|
3311
|
+
bounds: number[];
|
|
3312
|
+
data: number[];
|
|
3313
|
+
};
|
|
3314
|
+
table: {
|
|
3315
|
+
bounds: number[];
|
|
3316
|
+
data: number[];
|
|
3317
|
+
} | undefined;
|
|
3318
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3319
|
+
bounds: number[];
|
|
3320
|
+
data: number[];
|
|
3321
|
+
initTable: string[][];
|
|
3322
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3323
|
+
bounds: number[];
|
|
3324
|
+
data: number[];
|
|
3223
3325
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3224
3326
|
epsilon: number;
|
|
3225
3327
|
l: number;
|
|
@@ -3661,23 +3763,30 @@ declare const pcExercises: (Exercise<{
|
|
|
3661
3763
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3662
3764
|
a: number;
|
|
3663
3765
|
b: number;
|
|
3664
|
-
},
|
|
3766
|
+
}, {
|
|
3767
|
+
solutionFormat: string;
|
|
3768
|
+
}> | Exercise<{
|
|
3665
3769
|
a: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
3666
3770
|
b: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
3667
3771
|
isXRight: boolean;
|
|
3668
3772
|
aNumberType: string;
|
|
3669
3773
|
}, {
|
|
3670
3774
|
aNumberType: string[];
|
|
3775
|
+
solutionFormat: string;
|
|
3671
3776
|
}> | Exercise<{
|
|
3672
3777
|
a: number;
|
|
3673
3778
|
b: number;
|
|
3674
3779
|
c: number;
|
|
3675
|
-
},
|
|
3780
|
+
}, {
|
|
3781
|
+
solutionFormat: string;
|
|
3782
|
+
}> | Exercise<{
|
|
3676
3783
|
a: number;
|
|
3677
3784
|
b: number;
|
|
3678
3785
|
c: number;
|
|
3679
3786
|
d: number;
|
|
3680
|
-
},
|
|
3787
|
+
}, {
|
|
3788
|
+
solutionFormat: string;
|
|
3789
|
+
}> | Exercise<{
|
|
3681
3790
|
coefficients: number[];
|
|
3682
3791
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3683
3792
|
coefficients: number[];
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,aAAa,MAAM,2BAA2B,CAAC;AAE3D,OAAO,4BAA4B,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,QAAA,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kDAA6B,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
import { AlgebraicNode } from "../../tree/nodes/algebraicNode.js";
|
|
2
2
|
import { ToGGBCommandsProps } from "../../exercises/utils/geogebra/toGGBCommandsProps.js";
|
|
3
|
+
import { NodeIdentifiers } from "../../tree/nodes/nodeConstructor.js";
|
|
4
|
+
export type SpacePointIdentifiers = {
|
|
5
|
+
id: "spacePoint";
|
|
6
|
+
name: string;
|
|
7
|
+
x: NodeIdentifiers;
|
|
8
|
+
y: NodeIdentifiers;
|
|
9
|
+
z: NodeIdentifiers;
|
|
10
|
+
};
|
|
3
11
|
type AleaBound = {
|
|
4
12
|
min?: number;
|
|
5
13
|
max?: number;
|
|
6
14
|
excludes?: number[];
|
|
7
15
|
};
|
|
8
16
|
export declare abstract class SpacePointConstructor {
|
|
17
|
+
static fromIdentifiers(identifiers: SpacePointIdentifiers): SpacePoint;
|
|
9
18
|
static random(name: string, xOpts?: AleaBound, yOpts?: AleaBound, zOpts?: AleaBound): SpacePoint;
|
|
10
19
|
static randomDifferent(names: string[]): SpacePoint[];
|
|
11
20
|
static fromScalars(arr: number[], name?: string): SpacePoint;
|
|
@@ -16,6 +25,7 @@ export declare class SpacePoint {
|
|
|
16
25
|
y: AlgebraicNode;
|
|
17
26
|
z: AlgebraicNode;
|
|
18
27
|
constructor(name: string, x: AlgebraicNode, y: AlgebraicNode, z: AlgebraicNode);
|
|
28
|
+
toIdentifiers(): SpacePointIdentifiers;
|
|
19
29
|
getCoords(): AlgebraicNode[];
|
|
20
30
|
getEvaluatedCoords(): number[];
|
|
21
31
|
toMathString(): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spacePoint.d.ts","sourceRoot":"","sources":["../../../src/math/geometry/spacePoint.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAElE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sDAAsD,CAAC;
|
|
1
|
+
{"version":3,"file":"spacePoint.d.ts","sourceRoot":"","sources":["../../../src/math/geometry/spacePoint.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAElE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sDAAsD,CAAC;AAC1F,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAE7C,MAAM,MAAM,qBAAqB,GAAG;IAClC,EAAE,EAAE,YAAY,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,EAAE,eAAe,CAAC;IACnB,CAAC,EAAE,eAAe,CAAC;IACnB,CAAC,EAAE,eAAe,CAAC;CACpB,CAAC;AAEF,KAAK,SAAS,GAAG;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC;AACrE,8BAAsB,qBAAqB;IACzC,MAAM,CAAC,eAAe,CAAC,WAAW,EAAE,qBAAqB;IASzD,MAAM,CAAC,MAAM,CACX,IAAI,EAAE,MAAM,EACZ,KAAK,CAAC,EAAE,SAAS,EACjB,KAAK,CAAC,EAAE,SAAS,EACjB,KAAK,CAAC,EAAE,SAAS,GAChB,UAAU;IAyBb,MAAM,CAAC,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE;IAgCtC,MAAM,CAAC,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,IAAI,GAAE,MAAY;CAWrD;AAED,qBAAa,UAAU;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,EAAE,aAAa,CAAC;IACjB,CAAC,EAAE,aAAa,CAAC;IACjB,CAAC,EAAE,aAAa,CAAC;gBAEf,IAAI,EAAE,MAAM,EACZ,CAAC,EAAE,aAAa,EAChB,CAAC,EAAE,aAAa,EAChB,CAAC,EAAE,aAAa;IAQlB,aAAa,IAAI,qBAAqB;IAUtC,SAAS;IAGT,kBAAkB;IAGlB,YAAY;IAGZ,KAAK,IAAI,MAAM;IAIf,eAAe,IAAI,MAAM;IAKzB,QAAQ,IAAI,MAAM;IAIlB,QAAQ,IAAI,UAAU;IAkBtB,UAAU,IAAI,MAAM;IAIpB,MAAM,CAAC,CAAC,EAAE,UAAU,GAAG,OAAO;IAG9B,SAAS;IAOT,YAAY,CAAC,EACX,OAAc,EACd,SAAgB,EAChB,KAAK,EACL,IAAI,EACJ,KAAK,GACN,GAAE,kBAAuB;CAmB3B"}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { NumberNode } from "../../tree/nodes/numbers/numberNode.js";
|
|
2
2
|
import { randint } from "../utils/random/randint.js";
|
|
3
|
+
import { NodeConstructor, } from "../../tree/nodes/nodeConstructor.js";
|
|
3
4
|
export class SpacePointConstructor {
|
|
5
|
+
static fromIdentifiers(identifiers) {
|
|
6
|
+
return new SpacePoint(identifiers.name, NodeConstructor.fromIdentifiers(identifiers.x), NodeConstructor.fromIdentifiers(identifiers.y), NodeConstructor.fromIdentifiers(identifiers.z));
|
|
7
|
+
}
|
|
4
8
|
static random(name, xOpts, yOpts, zOpts) {
|
|
5
9
|
const x = randint(xOpts?.min ?? -9, xOpts?.max ?? 10, xOpts?.excludes ?? []);
|
|
6
10
|
const y = randint(yOpts?.min ?? -9, yOpts?.max ?? 10, yOpts?.excludes ?? []);
|
|
@@ -46,6 +50,15 @@ export class SpacePoint {
|
|
|
46
50
|
this.y = y;
|
|
47
51
|
this.z = z;
|
|
48
52
|
}
|
|
53
|
+
toIdentifiers() {
|
|
54
|
+
return {
|
|
55
|
+
id: "spacePoint",
|
|
56
|
+
name: this.name,
|
|
57
|
+
x: this.x.toIdentifiers(),
|
|
58
|
+
y: this.y.toIdentifiers(),
|
|
59
|
+
z: this.z.toIdentifiers(),
|
|
60
|
+
};
|
|
61
|
+
}
|
|
49
62
|
getCoords() {
|
|
50
63
|
return [this.x, this.y, this.z];
|
|
51
64
|
}
|
|
@@ -26,6 +26,7 @@ export declare class SubstractNode implements OperatorNode {
|
|
|
26
26
|
toAllValidTexs(): string[];
|
|
27
27
|
dangerouslyShuffle(): void;
|
|
28
28
|
toTex(options?: ToTexOptions): string;
|
|
29
|
+
toSimplificationTex(opts?: SimplifyOptions): string;
|
|
29
30
|
evaluate(vars?: Record<string, number>): number;
|
|
30
31
|
simplify(opts?: SimplifyOptions): AlgebraicNode;
|
|
31
32
|
equals(node: AlgebraicNode): boolean;
|