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.
- package/lib/exercises/exercise.d.ts +28 -32
- package/lib/exercises/exercise.d.ts.map +1 -1
- package/lib/exercises/math/calcul/arithmetics/commonDivisorsList.d.ts.map +1 -1
- package/lib/exercises/math/calcul/arithmetics/commonDivisorsList.js +9 -3
- package/lib/exercises/math/calcul/fractions/fractionAndIntegerDivision.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionAndIntegerDivision.js +12 -8
- package/lib/exercises/math/calcul/fractions/fractionAndIntegerProduct.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionAndIntegerProduct.js +6 -2
- package/lib/exercises/math/calcul/fractions/fractionsDivision.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionsDivision.js +10 -4
- package/lib/exercises/math/calcul/fractions/fractionsProduct.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionsProduct.js +6 -2
- package/lib/exercises/math/calcul/ordering/framing.d.ts.map +1 -1
- package/lib/exercises/math/calcul/ordering/framing.js +0 -1
- package/lib/exercises/math/calcul/proportionality/scaleCalculation.d.ts.map +1 -1
- package/lib/exercises/math/calcul/proportionality/scaleCalculation.js +4 -2
- package/lib/exercises/math/calcul/proportionality/scaleUsage.d.ts.map +1 -1
- package/lib/exercises/math/calcul/proportionality/scaleUsage.js +4 -2
- package/lib/exercises/math/calcul/rounding/rounding.d.ts.map +1 -1
- package/lib/exercises/math/calcul/rounding/rounding.js +7 -3
- package/lib/exercises/math/calculLitteral/distributivity/canonicalFormDevelopment.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/canonicalFormDevelopment.js +11 -5
- package/lib/exercises/math/calculLitteral/distributivity/firstIdentity.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/firstIdentity.js +14 -2
- package/lib/exercises/math/calculLitteral/distributivity/secondIdentity.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/secondIdentity.js +14 -2
- package/lib/exercises/math/calculLitteral/distributivity/thirdIdentity.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/thirdIdentity.js +14 -2
- package/lib/exercises/math/calculLitteral/equation/equationSimpleSquare.js +1 -1
- package/lib/exercises/math/calculLitteral/equation/multiplicationEquation.js +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq1.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq1.js +12 -2
- package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq2.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq2.js +12 -2
- package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq3.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq3.js +12 -2
- package/lib/exercises/math/calculLitteral/factorisation/factorizeCanonicalForm.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factorizeCanonicalForm.js +12 -2
- package/lib/exercises/math/calculLitteral/factorisation/factorizeCanonicalFormWithSqrt.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factorizeCanonicalFormWithSqrt.js +12 -4
- package/lib/exercises/math/derivation/derivative/thirdDegreeFunctionVariation.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/thirdDegreeFunctionVariation.js +6 -6
- package/lib/exercises/math/derivation/derivativeNumberReading.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivativeNumberReading.js +5 -6
- package/lib/exercises/math/functions/affines/affineExpressionFromTwoImages.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/affineExpressionFromTwoImages.js +14 -2
- package/lib/exercises/math/functions/affines/affineExpressionReading.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/affineExpressionReading.js +5 -6
- package/lib/exercises/math/functions/affines/interceptReading.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/interceptReading.js +5 -6
- package/lib/exercises/math/functions/affines/leadingCoefficient.js +5 -5
- package/lib/exercises/math/functions/basics/graphicEquation.js +5 -5
- package/lib/exercises/math/functions/basics/graphicInequation.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/graphicInequation.js +4 -6
- package/lib/exercises/math/functions/basics/imageFunctionGeogebra.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/imageFunctionGeogebra.js +2 -4
- package/lib/exercises/math/functions/basics/inverseImageFunctionGeogebra.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/inverseImageFunctionGeogebra.js +4 -6
- package/lib/exercises/math/functions/basics/twoFunctionsEquation.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/twoFunctionsEquation.js +4 -6
- package/lib/exercises/math/functions/basics/twoFunctionsInequation.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/twoFunctionsInequation.js +4 -6
- package/lib/exercises/math/functions/parity/parityFromGraph.js +6 -6
- package/lib/exercises/math/functions/trinoms/rootsReading.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/rootsReading.js +4 -7
- package/lib/exercises/math/functions/trinoms/summitReading.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/summitReading.js +5 -4
- package/lib/exercises/math/geometry/areas/rightTriangleArea.d.ts.map +1 -1
- package/lib/exercises/math/geometry/areas/rightTriangleArea.js +5 -4
- package/lib/exercises/math/geometry/areas/triangleArea.d.ts.map +1 -1
- package/lib/exercises/math/geometry/areas/triangleArea.js +5 -4
- package/lib/exercises/math/geometry/cartesian/cartesianEquationOfLine.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/cartesianEquationOfLine.js +8 -8
- package/lib/exercises/math/geometry/cartesian/directionVector.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/directionVector.js +6 -5
- package/lib/exercises/math/geometry/cartesian/drawAlineInGGB.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/drawAlineInGGB.js +9 -8
- package/lib/exercises/math/geometry/cartesian/placeAPoint.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/placeAPoint.js +9 -7
- package/lib/exercises/math/geometry/cartesian/pointCoordinates.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/pointCoordinates.js +12 -6
- package/lib/exercises/math/geometry/convexity/convexityQuadrinomialsGeo.d.ts.map +1 -1
- package/lib/exercises/math/geometry/convexity/convexityQuadrinomialsGeo.js +7 -6
- package/lib/exercises/math/geometry/convexity/convexityTrinomialsGeo.js +6 -6
- package/lib/exercises/math/geometry/pythagore/pythagore.d.ts.map +1 -1
- package/lib/exercises/math/geometry/pythagore/pythagore.js +5 -4
- package/lib/exercises/math/geometry/pythagore/pythagoreCalcul.d.ts.map +1 -1
- package/lib/exercises/math/geometry/pythagore/pythagoreCalcul.js +5 -4
- package/lib/exercises/math/geometry/thales/thales.d.ts.map +1 -1
- package/lib/exercises/math/geometry/thales/thales.js +5 -4
- package/lib/exercises/math/geometry/thales/thalesCalcul.d.ts.map +1 -1
- package/lib/exercises/math/geometry/thales/thalesCalcul.js +5 -4
- package/lib/exercises/math/geometry/vectors/coordinatesReading.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/coordinatesReading.js +5 -6
- package/lib/exercises/math/geometry/vectors/drawAVectorInGGB.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/drawAVectorInGGB.js +10 -8
- package/lib/exercises/math/geometry/vectors/equalCaracteristicFromGraph.js +5 -5
- package/lib/exercises/math/geometry/vectors/scalarProductViaCoords.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/scalarProductViaCoords.js +5 -1
- package/lib/exercises/math/geometry/vectors/vectorCoordinatesFromTwoPoints.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/vectorCoordinatesFromTwoPoints.js +5 -3
- package/lib/exercises/math/geometry/volumes/coneVolume.js +6 -6
- package/lib/exercises/math/geometry/volumes/parallelepipedVolume.js +6 -6
- package/lib/exercises/math/geometry/volumes/sphereVolume.js +6 -6
- package/lib/exercises/math/geometry/volumes/volumeOfCube.d.ts.map +1 -1
- package/lib/exercises/math/geometry/volumes/volumeOfCube.js +5 -4
- package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithSquareOrRectBase.d.ts.map +1 -1
- package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithSquareOrRectBase.js +5 -4
- package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleBase.d.ts.map +1 -1
- package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleBase.js +12 -11
- package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleRectBase.d.ts.map +1 -1
- package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleRectBase.js +5 -4
- package/lib/exercises/math/limits/limitReading.js +6 -6
- package/lib/exercises/math/percent/applyPercent.d.ts.map +1 -1
- package/lib/exercises/math/percent/applyPercent.js +10 -2
- package/lib/exercises/math/percent/averageEvolutionRate.d.ts.map +1 -1
- package/lib/exercises/math/percent/averageEvolutionRate.js +9 -4
- package/lib/exercises/math/percent/cmToEvolution.d.ts.map +1 -1
- package/lib/exercises/math/percent/cmToEvolution.js +3 -1
- package/lib/exercises/math/percent/globalPercent.d.ts.map +1 -1
- package/lib/exercises/math/percent/globalPercent.js +5 -3
- package/lib/exercises/math/probaStat/probabilityTree.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/probabilityTree.js +5 -4
- package/lib/exercises/math/probaStat/stats2var/fineAdjustementExercise.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats2var/fineAdjustementExercise.js +5 -4
- package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromGraph.js +13 -13
- package/lib/exercises/math/sequences/arithmetic/recognizeReasonFromGraph.js +10 -10
- package/lib/exercises/math/sequences/sequencePlot.d.ts.map +1 -1
- package/lib/exercises/math/sequences/sequencePlot.js +10 -12
- package/lib/exercises/math/spaceGeometry/vectors/spaceVectorCoordinatesFromPoints.d.ts.map +1 -1
- package/lib/exercises/math/spaceGeometry/vectors/spaceVectorCoordinatesFromPoints.js +3 -1
- package/lib/exercises/math/trigonometry/trigonometry.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/trigonometry.js +5 -4
- package/lib/exercises/math/trigonometry/trigonometryAngleCalcul.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/trigonometryAngleCalcul.js +5 -4
- package/lib/exercises/math/trigonometry/trigonometrySideCalcul.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/trigonometrySideCalcul.js +5 -4
- package/lib/exercises/pc/calibrationCurveOfSolution.d.ts.map +1 -1
- package/lib/exercises/pc/calibrationCurveOfSolution.js +11 -8
- package/lib/exercises/pc/electricity/ohmicConductorOrGenerator.d.ts.map +1 -1
- package/lib/exercises/pc/electricity/ohmicConductorOrGenerator.js +15 -5
- package/lib/exercises/pc/forces/calculateNormalOrFrictionForce.d.ts.map +1 -1
- package/lib/exercises/pc/forces/calculateNormalOrFrictionForce.js +0 -1
- package/lib/exercises/pc/math/proportionnalityCoeffFromLine.d.ts.map +1 -1
- package/lib/exercises/pc/math/proportionnalityCoeffFromLine.js +7 -6
- package/lib/exercises/pc/mecanicalWaves/elongationReading.d.ts.map +1 -1
- package/lib/exercises/pc/mecanicalWaves/elongationReading.js +7 -6
- package/lib/exercises/pc/mole/concentrationReading.d.ts.map +1 -1
- package/lib/exercises/pc/mole/concentrationReading.js +8 -6
- package/lib/exercises/pc/motion/characteristicsOfVelocityVector.d.ts.map +1 -1
- package/lib/exercises/pc/motion/characteristicsOfVelocityVector.js +2 -3
- package/lib/exercises/pc/motion/typeOfAcceleration.d.ts.map +1 -1
- package/lib/exercises/pc/motion/typeOfAcceleration.js +5 -4
- package/lib/exercises/pc/motion/typeOfMovement.js +4 -4
- package/lib/exercises/pc/recognizeRefractionOrReflectionAngles.d.ts.map +1 -1
- package/lib/exercises/pc/recognizeRefractionOrReflectionAngles.js +5 -4
- package/lib/exercises/pc/sound/findPeriodFromGraph.d.ts.map +1 -1
- package/lib/exercises/pc/sound/findPeriodFromGraph.js +7 -5
- package/lib/exercises/pc/sound/findPeriodOrFrequencyFromGraph.d.ts.map +1 -1
- package/lib/exercises/pc/sound/findPeriodOrFrequencyFromGraph.js +7 -6
- package/lib/exercises/utils/getDistinctQuestions.d.ts.map +1 -1
- package/lib/exercises/utils/getDistinctQuestions.js +2 -1
- package/lib/geogebra/geogebraConstructor.d.ts +18 -23
- package/lib/geogebra/geogebraConstructor.d.ts.map +1 -1
- package/lib/geogebra/geogebraConstructor.js +23 -16
- package/lib/index.d.ts +1 -76
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -57
- package/lib/prototypesEnhancement.d.ts +14 -0
- package/lib/prototypesEnhancement.d.ts.map +1 -0
- package/lib/prototypesEnhancement.js +26 -0
- package/lib/server.d.ts +1 -12
- package/lib/server.d.ts.map +1 -1
- package/lib/server.js +1 -24
- package/lib/utils/alignTex.js +2 -2
- package/package.json +3 -2
|
@@ -19,9 +19,10 @@ const getElongationReadingQuestion = () => {
|
|
|
19
19
|
`f(x) = If(x>=0, ${amplitude}*cos(x* (2*PI)/${period}))`,
|
|
20
20
|
`SetColor(f, "${(0, colors_1.randomColor)()}")`,
|
|
21
21
|
];
|
|
22
|
-
const ggb = new geogebraConstructor_1.GeogebraConstructor(
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
const ggb = new geogebraConstructor_1.GeogebraConstructor({
|
|
23
|
+
commands,
|
|
24
|
+
xAxis: { label: "$\\tiny \\text{Temps (s)}$" },
|
|
25
|
+
yAxis: { label: "$\\tiny \\text{y (cm)}$" },
|
|
25
26
|
});
|
|
26
27
|
const frac = new fractionNode_1.FractionNode(new multiplyNode_1.MultiplyNode((2).toTree(), piNode_1.PiNode), period.toTree()).simplify();
|
|
27
28
|
const node = new multiplyNode_1.MultiplyNode(amplitude.toTree(), new cosNode_1.CosNode(new multiplyNode_1.MultiplyNode(frac, new variableNode_1.VariableNode("t"))));
|
|
@@ -31,9 +32,9 @@ const getElongationReadingQuestion = () => {
|
|
|
31
32
|
keys: ["y", "t", "pi", "cos", "equal"],
|
|
32
33
|
answerFormat: "tex",
|
|
33
34
|
identifiers: { amplitude, period },
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
ggbOptions: ggb.getOptions({
|
|
36
|
+
coords: [-1, 20, -10, 10],
|
|
37
|
+
}),
|
|
37
38
|
};
|
|
38
39
|
return question;
|
|
39
40
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"concentrationReading.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/mole/concentrationReading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"concentrationReading.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/mole/concentrationReading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG,EAAE,CAAC;AA4CtB,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CAatD,CAAC"}
|
|
@@ -14,10 +14,12 @@ const getConcentrationReadingQuestion = () => {
|
|
|
14
14
|
`SetFixed(L, true)`,
|
|
15
15
|
`SetColor(L, "${(0, colors_1.randomColor)()}")`,
|
|
16
16
|
];
|
|
17
|
-
const ggb = new geogebraConstructor_1.GeogebraConstructor(
|
|
17
|
+
const ggb = new geogebraConstructor_1.GeogebraConstructor({
|
|
18
|
+
commands,
|
|
18
19
|
isGridSimple: false,
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
lockedAxesRatio: false,
|
|
21
|
+
xAxis: { label: "$\\tiny C (\\text{mol}\\cdot \\text{L}^{-1})$" },
|
|
22
|
+
yAxis: { label: "$\\tiny A$" },
|
|
21
23
|
});
|
|
22
24
|
const question = {
|
|
23
25
|
answer: concentration + "",
|
|
@@ -25,9 +27,9 @@ const getConcentrationReadingQuestion = () => {
|
|
|
25
27
|
keys: [],
|
|
26
28
|
answerFormat: "tex",
|
|
27
29
|
identifiers: {},
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
ggbOptions: ggb.getOptions({
|
|
31
|
+
coords: [-1, concentration + 2, -1, absorbtion + 2],
|
|
32
|
+
}),
|
|
31
33
|
};
|
|
32
34
|
return question;
|
|
33
35
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"characteristicsOfVelocityVector.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/motion/characteristicsOfVelocityVector.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;
|
|
1
|
+
{"version":3,"file":"characteristicsOfVelocityVector.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/motion/characteristicsOfVelocityVector.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAoFF,eAAO,MAAM,+BAA+B,EAAE,QAAQ,CAAC,WAAW,CAajE,CAAC"}
|
|
@@ -13,8 +13,7 @@ const getCharacteristicsOfVelocityVectorQuestion = () => {
|
|
|
13
13
|
answer: exo.answer.frenchify(),
|
|
14
14
|
instruction: exo.instruction,
|
|
15
15
|
keys: [],
|
|
16
|
-
|
|
17
|
-
coords: exo.ggbCoords,
|
|
16
|
+
ggbOptions: exo.ggb.getOptions({ coords: exo.ggbCoords }),
|
|
18
17
|
answerFormat: "tex",
|
|
19
18
|
identifiers: { norm: exo.answer },
|
|
20
19
|
};
|
|
@@ -43,7 +42,7 @@ const generateExercise = () => {
|
|
|
43
42
|
const answer = ggb.speedVector.norm;
|
|
44
43
|
return {
|
|
45
44
|
instruction,
|
|
46
|
-
ggb: new geogebraConstructor_1.GeogebraConstructor(
|
|
45
|
+
ggb: new geogebraConstructor_1.GeogebraConstructor({ commands: ggb.commands }),
|
|
47
46
|
ggbCoords: ggb.coords,
|
|
48
47
|
answer,
|
|
49
48
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typeOfAcceleration.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/motion/typeOfAcceleration.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"typeOfAcceleration.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/motion/typeOfAcceleration.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG,EAAE,CAAC;AAoFtB,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAepD,CAAC"}
|
|
@@ -11,9 +11,9 @@ const getTypeOfAccelerationQuestion = () => {
|
|
|
11
11
|
const question = {
|
|
12
12
|
answer: exo.answer,
|
|
13
13
|
instruction: exo.instruction,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
ggbOptions: exo.ggb.object.getOptions({
|
|
15
|
+
coords: exo.ggb.coords,
|
|
16
|
+
}),
|
|
17
17
|
keys: [],
|
|
18
18
|
answerFormat: "raw",
|
|
19
19
|
identifiers: {},
|
|
@@ -51,7 +51,8 @@ const generateExo = () => {
|
|
|
51
51
|
const generateGgb = (typeOfAcceleration) => {
|
|
52
52
|
const points = getPoints(typeOfAcceleration);
|
|
53
53
|
return {
|
|
54
|
-
object: new geogebraConstructor_1.GeogebraConstructor(
|
|
54
|
+
object: new geogebraConstructor_1.GeogebraConstructor({
|
|
55
|
+
commands: points.points,
|
|
55
56
|
hideAxes: true,
|
|
56
57
|
hideGrid: true,
|
|
57
58
|
}),
|
|
@@ -13,9 +13,9 @@ const getTypeOfMovementQuestion = () => {
|
|
|
13
13
|
const question = {
|
|
14
14
|
answer: exo.answer,
|
|
15
15
|
instruction: exo.instruction,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
ggbOptions: ggb.getOptions({
|
|
17
|
+
coords: exo.coords,
|
|
18
|
+
}),
|
|
19
19
|
keys: [],
|
|
20
20
|
answerFormat: "raw",
|
|
21
21
|
identifiers: {},
|
|
@@ -76,7 +76,7 @@ const getGgb = (movementType) => {
|
|
|
76
76
|
break;
|
|
77
77
|
}
|
|
78
78
|
return {
|
|
79
|
-
ggb: new geogebraConstructor_1.GeogebraConstructor(commands
|
|
79
|
+
ggb: new geogebraConstructor_1.GeogebraConstructor({ commands }),
|
|
80
80
|
coords,
|
|
81
81
|
};
|
|
82
82
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recognizeRefractionOrReflectionAngles.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/recognizeRefractionOrReflectionAngles.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"recognizeRefractionOrReflectionAngles.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/recognizeRefractionOrReflectionAngles.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG,EAAE,CAAC;AAmHtB,eAAO,MAAM,qCAAqC,EAAE,QAAQ,CAAC,WAAW,CAavE,CAAC"}
|
|
@@ -23,9 +23,9 @@ const getRecognizeRefractionOrReflectionAnglesQuestion = () => {
|
|
|
23
23
|
answer: exo.isAsking,
|
|
24
24
|
instruction: `Un rayon arrive sur la surface de séparation entre deux milieux. Comment appelle-t-on l'angle représenté ci-dessous ?`,
|
|
25
25
|
keys: [],
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
ggbOptions: exo.ggb.getOptions({
|
|
27
|
+
coords: exo.coords,
|
|
28
|
+
}),
|
|
29
29
|
answerFormat: "raw",
|
|
30
30
|
identifiers: {},
|
|
31
31
|
};
|
|
@@ -76,7 +76,8 @@ const generateExercise = () => {
|
|
|
76
76
|
`SetColor(Second,"#0a6a01")`,
|
|
77
77
|
`SetColor(Ang,"#6a0101")`,
|
|
78
78
|
];
|
|
79
|
-
const ggb = new geogebraConstructor_1.GeogebraConstructor(
|
|
79
|
+
const ggb = new geogebraConstructor_1.GeogebraConstructor({
|
|
80
|
+
commands,
|
|
80
81
|
hideGrid: true,
|
|
81
82
|
hideAxes: true,
|
|
82
83
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"findPeriodFromGraph.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/sound/findPeriodFromGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAQlC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,EAAE,EAAE,CAAC;CAC1B,CAAC;
|
|
1
|
+
{"version":3,"file":"findPeriodFromGraph.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/sound/findPeriodFromGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAQlC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,EAAE,EAAE,CAAC;CAC1B,CAAC;AAoEF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAcrD,CAAC"}
|
|
@@ -37,8 +37,10 @@ const getFindPeriodFromGraphQuestion = () => {
|
|
|
37
37
|
for (let i = 1; i < 10; i++) {
|
|
38
38
|
commands.push(`S_{${i}} = Translate(S, (${i * period}, 0))`, `SetFixed(S_{${i}}, true)`, `SetColor(S_{${i}}, "${color}")`);
|
|
39
39
|
}
|
|
40
|
-
const ggb = new geogebraConstructor_1.GeogebraConstructor(
|
|
41
|
-
|
|
40
|
+
const ggb = new geogebraConstructor_1.GeogebraConstructor({
|
|
41
|
+
commands,
|
|
42
|
+
xAxis: { label: "$\\tiny Temps (ms)$" },
|
|
43
|
+
yAxis: { label: "$\\tiny Tension (V)$" },
|
|
42
44
|
isGridSimple: true,
|
|
43
45
|
});
|
|
44
46
|
const question = {
|
|
@@ -47,9 +49,9 @@ const getFindPeriodFromGraphQuestion = () => {
|
|
|
47
49
|
keys: [],
|
|
48
50
|
answerFormat: "tex",
|
|
49
51
|
identifiers: { period, splinePoints },
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
52
|
+
ggbOptions: ggb.getOptions({
|
|
53
|
+
coords: [0, 20, -8, 8],
|
|
54
|
+
}),
|
|
53
55
|
};
|
|
54
56
|
return question;
|
|
55
57
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"findPeriodOrFrequencyFromGraph.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/sound/findPeriodOrFrequencyFromGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,EAAE,EAAE,CAAC;CAC1B,CAAC;
|
|
1
|
+
{"version":3,"file":"findPeriodOrFrequencyFromGraph.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/sound/findPeriodOrFrequencyFromGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,EAAE,EAAE,CAAC;CAC1B,CAAC;AAsFF,eAAO,MAAM,8BAA8B,EAAE,QAAQ,CAAC,WAAW,CAchE,CAAC"}
|
|
@@ -38,9 +38,10 @@ const getFindPeriodOrFrequencyFromGraphQuestion = () => {
|
|
|
38
38
|
for (let i = 1; i < 10; i++) {
|
|
39
39
|
commands.push(`S_{${i}} = Translate(S, (${i * period}, 0))`, `SetFixed(S_{${i}}, true)`, `SetColor(S_{${i}}, "${color}")`);
|
|
40
40
|
}
|
|
41
|
-
const ggb = new geogebraConstructor_1.GeogebraConstructor(
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
const ggb = new geogebraConstructor_1.GeogebraConstructor({
|
|
42
|
+
commands,
|
|
43
|
+
xAxis: { label: "$\\tiny Temps (ms)$" },
|
|
44
|
+
yAxis: { label: "$\\tiny Tension (V)$" },
|
|
44
45
|
});
|
|
45
46
|
const isAsking = (0, coinFlip_1.coinFlip)() ? `période` : `fréquence`;
|
|
46
47
|
const frequency = (1 / period) * 1000;
|
|
@@ -54,9 +55,9 @@ const getFindPeriodOrFrequencyFromGraphQuestion = () => {
|
|
|
54
55
|
keys: [],
|
|
55
56
|
answerFormat: "tex",
|
|
56
57
|
identifiers: { period, frequency, splinePoints },
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
ggbOptions: ggb.getOptions({
|
|
59
|
+
coords: [0, 20, -8, 8],
|
|
60
|
+
}),
|
|
60
61
|
};
|
|
61
62
|
return question;
|
|
62
63
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getDistinctQuestions.d.ts","sourceRoot":"","sources":["../../../src/exercises/utils/getDistinctQuestions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,WAOnD;AAED;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,cACpB,MAAM,SAAS,GAAG,CAAC,MAC1B,MAAM,QACJ,MAAM,KACX,SAAS,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"getDistinctQuestions.d.ts","sourceRoot":"","sources":["../../../src/exercises/utils/getDistinctQuestions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,WAOnD;AAED;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,cACpB,MAAM,SAAS,GAAG,CAAC,MAC1B,MAAM,QACJ,MAAM,KACX,SAAS,GAAG,CAAC,EAoBf,CAAC"}
|
|
@@ -30,7 +30,8 @@ const getDistinctQuestions = (generator, nb, max) => {
|
|
|
30
30
|
question = generator();
|
|
31
31
|
} while (res.some((q) => q.instruction === question.instruction &&
|
|
32
32
|
q.answer === question.answer &&
|
|
33
|
-
(!q.commands ||
|
|
33
|
+
(!q.ggbOptions?.commands ||
|
|
34
|
+
equalTab(q.ggbOptions?.commands, question.ggbOptions?.commands))));
|
|
34
35
|
res.push(question);
|
|
35
36
|
}
|
|
36
37
|
return res;
|
|
@@ -1,14 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
isAxesRatioFixed?: boolean;
|
|
3
|
-
gridDistance?: [number, number] | false;
|
|
4
|
-
hideAxes?: boolean;
|
|
5
|
-
hideGrid?: boolean;
|
|
6
|
-
isGridBold?: boolean;
|
|
7
|
-
isGridSimple?: boolean;
|
|
8
|
-
isXAxesNatural?: boolean;
|
|
9
|
-
axisLabels?: string[];
|
|
10
|
-
is3D?: boolean;
|
|
11
|
-
};
|
|
1
|
+
import { GeogebraAxisOptions, GeogebraOptions } from "../exercises/exercise";
|
|
12
2
|
type GetAdaptedCoords = {
|
|
13
3
|
xMin: number;
|
|
14
4
|
xMax: number;
|
|
@@ -18,20 +8,25 @@ type GetAdaptedCoords = {
|
|
|
18
8
|
zMax?: number;
|
|
19
9
|
forceShowAxes?: boolean;
|
|
20
10
|
};
|
|
11
|
+
type GetOptionsProps = {
|
|
12
|
+
coords: number[];
|
|
13
|
+
};
|
|
21
14
|
export declare class GeogebraConstructor {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
15
|
+
customToolBar?: string;
|
|
16
|
+
forbidShiftDragZoom?: boolean;
|
|
17
|
+
commands?: string[];
|
|
18
|
+
is3D?: boolean;
|
|
19
|
+
gridDistance?: [number, number] | false;
|
|
20
|
+
hideGrid?: boolean;
|
|
21
|
+
hideAxes?: boolean;
|
|
22
|
+
isGridSimple?: boolean;
|
|
23
|
+
isGridBold?: boolean;
|
|
24
|
+
lockedAxesRatio?: number | false;
|
|
25
|
+
xAxis?: GeogebraAxisOptions;
|
|
26
|
+
yAxis?: GeogebraAxisOptions;
|
|
27
|
+
constructor(options: Omit<GeogebraOptions, "coords">);
|
|
33
28
|
getAdaptedCoords({ xMin, xMax, yMin, yMax, zMin, zMax, forceShowAxes, }: GetAdaptedCoords): number[];
|
|
34
|
-
getOptions(): GeogebraOptions;
|
|
29
|
+
getOptions({ coords }: GetOptionsProps): GeogebraOptions;
|
|
35
30
|
}
|
|
36
31
|
export {};
|
|
37
32
|
//# sourceMappingURL=geogebraConstructor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geogebraConstructor.d.ts","sourceRoot":"","sources":["../../src/geogebra/geogebraConstructor.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"geogebraConstructor.d.ts","sourceRoot":"","sources":["../../src/geogebra/geogebraConstructor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAGhF,KAAK,gBAAgB,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AACF,KAAK,eAAe,GAAG;IACrB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AACF,qBAAa,mBAAmB;IAC9B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,KAAK,CAAC;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IACjC,KAAK,CAAC,EAAE,mBAAmB,CAAC;IAC5B,KAAK,CAAC,EAAE,mBAAmB,CAAC;gBAEhB,OAAO,EAAE,IAAI,CAAC,eAAe,EAAE,QAAQ,CAAC;IAepD,gBAAgB,CAAC,EACf,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,aAAa,GACd,EAAE,gBAAgB;IAyCnB,UAAU,CAAC,EAAE,MAAM,EAAE,EAAE,eAAe,GAAG,eAAe;CAiBzD"}
|
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GeogebraConstructor = void 0;
|
|
4
|
+
const toolBarConstructor_1 = require("../exercises/utils/geogebra/toolBarConstructor");
|
|
4
5
|
class GeogebraConstructor {
|
|
5
|
-
constructor(
|
|
6
|
-
this.
|
|
7
|
-
this.
|
|
6
|
+
constructor(options) {
|
|
7
|
+
this.customToolBar = options?.customToolBar ?? (0, toolBarConstructor_1.toolBarConstructor)({});
|
|
8
|
+
this.forbidShiftDragZoom = options?.forbidShiftDragZoom;
|
|
9
|
+
this.commands = options.commands;
|
|
10
|
+
this.is3D = options?.is3D;
|
|
8
11
|
this.gridDistance = options?.gridDistance ?? [1, 1];
|
|
9
|
-
this.hideGrid = options?.hideGrid
|
|
10
|
-
this.hideAxes = options?.hideAxes
|
|
11
|
-
this.isGridBold = options?.isGridBold
|
|
12
|
-
this.isGridSimple = options?.isGridSimple ??
|
|
13
|
-
this.
|
|
14
|
-
this.
|
|
15
|
-
this.
|
|
12
|
+
this.hideGrid = options?.hideGrid;
|
|
13
|
+
this.hideAxes = options?.hideAxes;
|
|
14
|
+
this.isGridBold = options?.isGridBold;
|
|
15
|
+
this.isGridSimple = options?.isGridSimple ?? true;
|
|
16
|
+
this.lockedAxesRatio = options?.lockedAxesRatio ?? 1;
|
|
17
|
+
this.xAxis = options?.xAxis;
|
|
18
|
+
this.yAxis = options?.yAxis;
|
|
16
19
|
}
|
|
17
20
|
getAdaptedCoords({ xMin, xMax, yMin, yMax, zMin, zMax, forceShowAxes, }) {
|
|
18
21
|
const showAxes = forceShowAxes ?? this.hideAxes ? false : true;
|
|
@@ -54,17 +57,21 @@ class GeogebraConstructor {
|
|
|
54
57
|
return coords;
|
|
55
58
|
}
|
|
56
59
|
}
|
|
57
|
-
getOptions() {
|
|
60
|
+
getOptions({ coords }) {
|
|
58
61
|
return {
|
|
62
|
+
customToolBar: this.customToolBar,
|
|
63
|
+
forbidShiftDragZoom: this.forbidShiftDragZoom,
|
|
64
|
+
commands: this.commands,
|
|
65
|
+
coords: coords,
|
|
66
|
+
is3D: this.is3D,
|
|
67
|
+
gridDistance: this.gridDistance,
|
|
59
68
|
hideAxes: this.hideAxes,
|
|
60
69
|
hideGrid: this.hideGrid,
|
|
61
70
|
isGridBold: this.isGridBold,
|
|
62
71
|
isGridSimple: this.isGridSimple,
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
axisLabels: this.axisLabels,
|
|
67
|
-
is3D: this.is3D,
|
|
72
|
+
lockedAxesRatio: this.lockedAxesRatio,
|
|
73
|
+
xAxis: this.xAxis,
|
|
74
|
+
yAxis: this.yAxis,
|
|
68
75
|
};
|
|
69
76
|
}
|
|
70
77
|
}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,47 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
declare global {
|
|
3
|
-
interface Number {
|
|
4
|
-
toTree: () => AlgebraicNode;
|
|
5
|
-
frenchify: () => string;
|
|
6
|
-
toScientific: (decimals?: number) => AlgebraicNode;
|
|
7
|
-
}
|
|
8
|
-
interface String {
|
|
9
|
-
toTree: () => AlgebraicNode;
|
|
10
|
-
unfrenchify: () => number;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* TODO
|
|
15
|
-
* Décimal : permettre facilement -0.xxx
|
|
16
|
-
* Tree shaking export
|
|
17
|
-
*
|
|
18
|
-
* VEA:
|
|
19
|
-
* -> -3x est bien transofmré en -3*x, x*(-3) mais pas en -x*3
|
|
20
|
-
* ->> faire le meme delire que pour les power mais pour les opposite ?
|
|
21
|
-
* c'est à dire créer toutes les permuts en déplacant le moins qquepart
|
|
22
|
-
* -> faire des nodes pour les Ensembles de nombre
|
|
23
|
-
*
|
|
24
|
-
* !-> choses pour lesquelles la v1 ne marchera pas :
|
|
25
|
-
* !-- fractions non réduites
|
|
26
|
-
* !-- nbs décimaux avec des 0
|
|
27
|
-
* !-- nb quelconque de moins, genre -3*-4 ou -x/-y
|
|
28
|
-
* !-> pour ces choses là il faut obligatoirement parser la rpéonse élève ?
|
|
29
|
-
*
|
|
30
|
-
* Passer les sqrtNode en tree-iable
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* !!!à fix :
|
|
35
|
-
* ! fraction réductible
|
|
36
|
-
* ! 0,20 au lieu de 0,2
|
|
37
|
-
* ! moins partout dans fraction
|
|
38
|
-
* !puissances négatives vers inverse fraction
|
|
39
|
-
* ! simplification du ln
|
|
40
|
-
* ! meileure gestion des [] : le clavier devriat pouvoir produire des left/right ;
|
|
41
|
-
* !aussi en tapant [ puis diviser, le crochet passe en numérateur
|
|
42
|
-
* ! espace tous les 3 chiffres dans un nb (le clavier doit le fournir aussi!)
|
|
43
|
-
|
|
44
|
-
*/
|
|
1
|
+
import "./prototypesEnhancement";
|
|
45
2
|
declare const mathExercises: (import("./exercises/exercise").Exercise<{
|
|
46
3
|
numbers: number[];
|
|
47
4
|
}> | import("./exercises/exercise").Exercise<{
|
|
@@ -642,38 +599,6 @@ declare const mathExercises: (import("./exercises/exercise").Exercise<{
|
|
|
642
599
|
ineqSymbol: import("./math/inequations/inequation").InegalitySymbols;
|
|
643
600
|
intervals: {
|
|
644
601
|
a: number;
|
|
645
|
-
/**
|
|
646
|
-
* TODO
|
|
647
|
-
* Décimal : permettre facilement -0.xxx
|
|
648
|
-
* Tree shaking export
|
|
649
|
-
*
|
|
650
|
-
* VEA:
|
|
651
|
-
* -> -3x est bien transofmré en -3*x, x*(-3) mais pas en -x*3
|
|
652
|
-
* ->> faire le meme delire que pour les power mais pour les opposite ?
|
|
653
|
-
* c'est à dire créer toutes les permuts en déplacant le moins qquepart
|
|
654
|
-
* -> faire des nodes pour les Ensembles de nombre
|
|
655
|
-
*
|
|
656
|
-
* !-> choses pour lesquelles la v1 ne marchera pas :
|
|
657
|
-
* !-- fractions non réduites
|
|
658
|
-
* !-- nbs décimaux avec des 0
|
|
659
|
-
* !-- nb quelconque de moins, genre -3*-4 ou -x/-y
|
|
660
|
-
* !-> pour ces choses là il faut obligatoirement parser la rpéonse élève ?
|
|
661
|
-
*
|
|
662
|
-
* Passer les sqrtNode en tree-iable
|
|
663
|
-
*
|
|
664
|
-
*
|
|
665
|
-
*
|
|
666
|
-
* !!!à fix :
|
|
667
|
-
* ! fraction réductible
|
|
668
|
-
* ! 0,20 au lieu de 0,2
|
|
669
|
-
* ! moins partout dans fraction
|
|
670
|
-
* !puissances négatives vers inverse fraction
|
|
671
|
-
* ! simplification du ln
|
|
672
|
-
* ! meileure gestion des [] : le clavier devriat pouvoir produire des left/right ;
|
|
673
|
-
* !aussi en tapant [ puis diviser, le crochet passe en numérateur
|
|
674
|
-
* ! espace tous les 3 chiffres dans un nb (le clavier doit le fournir aussi!)
|
|
675
|
-
|
|
676
|
-
*/
|
|
677
602
|
b: number;
|
|
678
603
|
closure: import("./tree/nodes/sets/closure").ClosureType;
|
|
679
604
|
}[];
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,OAAO,yBAAyB,CAAC;AAEjC,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAA+B,CAAC;AACnD,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAA6B,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -24,65 +24,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.pcExercises = exports.mathExercises = void 0;
|
|
27
|
-
// import { exercises } from "./exercises/exercises";
|
|
28
|
-
const numberNode_1 = require("./tree/nodes/numbers/numberNode");
|
|
29
27
|
const MathExercises = __importStar(require("./exercises/math"));
|
|
30
28
|
const PCExercises = __importStar(require("./exercises/pc"));
|
|
31
|
-
|
|
32
|
-
const toScientific_1 = require("./utils/numberPrototype/toScientific");
|
|
33
|
-
const variableNode_1 = require("./tree/nodes/variables/variableNode");
|
|
34
|
-
String.prototype.unfrenchify = function () {
|
|
35
|
-
return Number(this.valueOf().replace(",", "."));
|
|
36
|
-
};
|
|
37
|
-
String.prototype.toTree = function () {
|
|
38
|
-
return new variableNode_1.VariableNode(this.valueOf());
|
|
39
|
-
};
|
|
40
|
-
Number.prototype.toTree = function () {
|
|
41
|
-
const value = this.valueOf();
|
|
42
|
-
if (value === Infinity)
|
|
43
|
-
return infiniteNode_1.PlusInfinityNode;
|
|
44
|
-
if (value === -Infinity)
|
|
45
|
-
return infiniteNode_1.MinusInfinityNode;
|
|
46
|
-
return new numberNode_1.NumberNode(value);
|
|
47
|
-
};
|
|
48
|
-
Number.prototype.frenchify = function () {
|
|
49
|
-
return (this.valueOf() + "").replace(".", ",");
|
|
50
|
-
};
|
|
51
|
-
Number.prototype.toScientific = function (decimals) {
|
|
52
|
-
return (0, toScientific_1.toScientific)(this.valueOf(), decimals);
|
|
53
|
-
};
|
|
54
|
-
/**
|
|
55
|
-
* TODO
|
|
56
|
-
* Décimal : permettre facilement -0.xxx
|
|
57
|
-
* Tree shaking export
|
|
58
|
-
*
|
|
59
|
-
* VEA:
|
|
60
|
-
* -> -3x est bien transofmré en -3*x, x*(-3) mais pas en -x*3
|
|
61
|
-
* ->> faire le meme delire que pour les power mais pour les opposite ?
|
|
62
|
-
* c'est à dire créer toutes les permuts en déplacant le moins qquepart
|
|
63
|
-
* -> faire des nodes pour les Ensembles de nombre
|
|
64
|
-
*
|
|
65
|
-
* !-> choses pour lesquelles la v1 ne marchera pas :
|
|
66
|
-
* !-- fractions non réduites
|
|
67
|
-
* !-- nbs décimaux avec des 0
|
|
68
|
-
* !-- nb quelconque de moins, genre -3*-4 ou -x/-y
|
|
69
|
-
* !-> pour ces choses là il faut obligatoirement parser la rpéonse élève ?
|
|
70
|
-
*
|
|
71
|
-
* Passer les sqrtNode en tree-iable
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
* !!!à fix :
|
|
76
|
-
* ! fraction réductible
|
|
77
|
-
* ! 0,20 au lieu de 0,2
|
|
78
|
-
* ! moins partout dans fraction
|
|
79
|
-
* !puissances négatives vers inverse fraction
|
|
80
|
-
* ! simplification du ln
|
|
81
|
-
* ! meileure gestion des [] : le clavier devriat pouvoir produire des left/right ;
|
|
82
|
-
* !aussi en tapant [ puis diviser, le crochet passe en numérateur
|
|
83
|
-
* ! espace tous les 3 chiffres dans un nb (le clavier doit le fournir aussi!)
|
|
84
|
-
|
|
85
|
-
*/
|
|
29
|
+
require("./prototypesEnhancement");
|
|
86
30
|
const mathExercises = Object.values(MathExercises);
|
|
87
31
|
exports.mathExercises = mathExercises;
|
|
88
32
|
const pcExercises = Object.values(PCExercises);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AlgebraicNode } from "./tree/nodes/algebraicNode";
|
|
2
|
+
declare global {
|
|
3
|
+
interface Number {
|
|
4
|
+
toTree: () => AlgebraicNode;
|
|
5
|
+
frenchify: () => string;
|
|
6
|
+
toScientific: (decimals?: number) => AlgebraicNode;
|
|
7
|
+
}
|
|
8
|
+
interface String {
|
|
9
|
+
toTree: () => AlgebraicNode;
|
|
10
|
+
unfrenchify: () => number;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=prototypesEnhancement.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prototypesEnhancement.d.ts","sourceRoot":"","sources":["../src/prototypesEnhancement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAS3D,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,MAAM,EAAE,MAAM,aAAa,CAAC;QAC5B,SAAS,EAAE,MAAM,MAAM,CAAC;QACxB,YAAY,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,KAAK,aAAa,CAAC;KACpD;IACD,UAAU,MAAM;QACd,MAAM,EAAE,MAAM,aAAa,CAAC;QAC5B,WAAW,EAAE,MAAM,MAAM,CAAC;KAC3B;CACF;AAqBD,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const infiniteNode_1 = require("./tree/nodes/numbers/infiniteNode");
|
|
4
|
+
const numberNode_1 = require("./tree/nodes/numbers/numberNode");
|
|
5
|
+
const variableNode_1 = require("./tree/nodes/variables/variableNode");
|
|
6
|
+
const toScientific_1 = require("./utils/numberPrototype/toScientific");
|
|
7
|
+
String.prototype.toTree = function () {
|
|
8
|
+
return new variableNode_1.VariableNode(this.valueOf());
|
|
9
|
+
};
|
|
10
|
+
String.prototype.unfrenchify = function () {
|
|
11
|
+
return Number(this.valueOf().replace(",", "."));
|
|
12
|
+
};
|
|
13
|
+
Number.prototype.toTree = function () {
|
|
14
|
+
const value = this.valueOf();
|
|
15
|
+
if (value === Infinity)
|
|
16
|
+
return infiniteNode_1.PlusInfinityNode;
|
|
17
|
+
if (value === -Infinity)
|
|
18
|
+
return infiniteNode_1.MinusInfinityNode;
|
|
19
|
+
return new numberNode_1.NumberNode(value);
|
|
20
|
+
};
|
|
21
|
+
Number.prototype.frenchify = function () {
|
|
22
|
+
return (this.valueOf() + "").replace(".", ",");
|
|
23
|
+
};
|
|
24
|
+
Number.prototype.toScientific = function (decimals) {
|
|
25
|
+
return (0, toScientific_1.toScientific)(this.valueOf(), decimals);
|
|
26
|
+
};
|
package/lib/server.d.ts
CHANGED
|
@@ -1,13 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
declare global {
|
|
3
|
-
interface Number {
|
|
4
|
-
toTree: () => AlgebraicNode;
|
|
5
|
-
frenchify: () => string;
|
|
6
|
-
toScientific: (decimals?: number) => AlgebraicNode;
|
|
7
|
-
}
|
|
8
|
-
interface String {
|
|
9
|
-
toTree: () => AlgebraicNode;
|
|
10
|
-
unfrenchify: () => number;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
1
|
+
import "./prototypesEnhancement";
|
|
13
2
|
//# sourceMappingURL=server.d.ts.map
|
package/lib/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AA2CA,OAAO,yBAAyB,CAAC"}
|