math-exercises 2.2.69 → 2.2.70
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/divisorsList.d.ts.map +1 -1
- package/lib/exercises/math/calcul/arithmetics/divisorsList.js +2 -1
- package/lib/exercises/math/calcul/arithmetics/primeNumbers.d.ts.map +1 -1
- package/lib/exercises/math/calcul/arithmetics/primeNumbers.js +2 -1
- package/lib/exercises/math/calcul/fractions/fractionsOperations.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionsOperations.js +1 -0
- package/lib/exercises/math/calculLitteral/equation/equationType1Exercise.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/equationType1Exercise.js +3 -6
- package/lib/exercises/math/calculLitteral/equation/equationType2Exercise.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/equationType2Exercise.js +3 -8
- package/lib/exercises/math/calculLitteral/equation/equationType3Exercise.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/equationType3Exercise.js +7 -9
- package/lib/exercises/math/calculLitteral/equation/equationType4Exercise.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/equationType4Exercise.js +6 -19
- package/lib/exercises/math/calculLitteral/factorisation/factoByX.d.ts +8 -0
- package/lib/exercises/math/calculLitteral/factorisation/factoByX.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/factorisation/factoByX.js +146 -0
- package/lib/exercises/math/calculLitteral/factorisation/index.d.ts +1 -0
- package/lib/exercises/math/calculLitteral/factorisation/index.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/index.js +1 -0
- package/lib/exercises/math/functions/absolute/absolueValueAffineEquation.d.ts.map +1 -1
- package/lib/exercises/math/functions/absolute/absolueValueAffineEquation.js +2 -5
- package/lib/exercises/math/functions/trinoms/coefficientsIdentification.js +3 -3
- package/lib/exercises/math/functions/trinoms/findSecondRoot.d.ts +2 -2
- package/lib/exercises/math/functions/trinoms/findSecondRoot.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/findSecondRoot.js +5 -5
- package/lib/exercises/math/functions/trinoms/rootsProduct.d.ts +2 -2
- package/lib/exercises/math/functions/trinoms/rootsProduct.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/rootsProduct.js +6 -6
- package/lib/exercises/math/functions/trinoms/rootsSum.d.ts +2 -2
- package/lib/exercises/math/functions/trinoms/rootsSum.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/rootsSum.js +7 -7
- package/lib/exercises/math/functions/trinoms/trinomSignFromRoots.js +6 -6
- package/lib/exercises/math/geometry/areas/rightTriangleArea.d.ts +3 -1
- package/lib/exercises/math/geometry/areas/rightTriangleArea.d.ts.map +1 -1
- package/lib/exercises/math/geometry/areas/rightTriangleArea.js +10 -22
- package/lib/exercises/math/geometry/areas/triangleArea.d.ts +6 -1
- package/lib/exercises/math/geometry/areas/triangleArea.d.ts.map +1 -1
- package/lib/exercises/math/geometry/areas/triangleArea.js +34 -48
- package/lib/exercises/math/geometry/index.d.ts +1 -0
- package/lib/exercises/math/geometry/index.d.ts.map +1 -1
- package/lib/exercises/math/geometry/index.js +1 -0
- package/lib/exercises/math/geometry/pythagore/isTriangleRight.d.ts.map +1 -1
- package/lib/exercises/math/geometry/pythagore/pythagore.d.ts +0 -3
- package/lib/exercises/math/geometry/pythagore/pythagore.d.ts.map +1 -1
- package/lib/exercises/math/geometry/pythagore/pythagore.js +19 -25
- package/lib/exercises/math/geometry/pythagore/pythagoreCalcul.d.ts +1 -2
- package/lib/exercises/math/geometry/pythagore/pythagoreCalcul.d.ts.map +1 -1
- package/lib/exercises/math/geometry/pythagore/pythagoreCalcul.js +30 -65
- package/lib/exercises/math/geometry/quadrilaterals/index.d.ts +2 -0
- package/lib/exercises/math/geometry/quadrilaterals/index.d.ts.map +1 -0
- package/lib/exercises/math/geometry/quadrilaterals/index.js +17 -0
- package/lib/exercises/math/geometry/quadrilaterals/quadrilateralRecognition.d.ts +14 -0
- package/lib/exercises/math/geometry/quadrilaterals/quadrilateralRecognition.d.ts.map +1 -0
- package/lib/exercises/math/geometry/quadrilaterals/quadrilateralRecognition.js +221 -0
- package/lib/exercises/math/geometry/thales/index.d.ts.map +1 -1
- package/lib/exercises/math/geometry/thales/index.js +0 -1
- package/lib/exercises/math/geometry/thales/thales.js +2 -2
- package/lib/exercises/math/geometry/thales/thalesCalcul.d.ts +3 -4
- package/lib/exercises/math/geometry/thales/thalesCalcul.d.ts.map +1 -1
- package/lib/exercises/math/geometry/thales/thalesCalcul.js +69 -78
- package/lib/exercises/math/geometry/volumes/parallelepipedVolume.d.ts.map +1 -1
- package/lib/exercises/math/geometry/volumes/parallelepipedVolume.js +4 -3
- package/lib/exercises/math/geometry/volumes/sphereVolume.js +1 -1
- package/lib/exercises/math/trigonometry/trigonometry.d.ts +2 -3
- package/lib/exercises/math/trigonometry/trigonometry.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/trigonometry.js +32 -31
- package/lib/exercises/math/trigonometry/trigonometryAngleCalcul.d.ts +3 -2
- package/lib/exercises/math/trigonometry/trigonometryAngleCalcul.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/trigonometryAngleCalcul.js +18 -28
- package/lib/exercises/math/trigonometry/trigonometrySideCalcul.d.ts +5 -4
- package/lib/exercises/math/trigonometry/trigonometrySideCalcul.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/trigonometrySideCalcul.js +60 -56
- package/lib/exercises/pc/index.d.ts +0 -4
- package/lib/exercises/pc/index.d.ts.map +1 -1
- package/lib/exercises/pc/index.js +6 -4
- package/lib/exercises/utils/geogebra/toGGBCommandsProps.d.ts +1 -0
- package/lib/exercises/utils/geogebra/toGGBCommandsProps.d.ts.map +1 -1
- package/lib/exercises/vea/equationVEA.d.ts +2 -0
- package/lib/exercises/vea/equationVEA.d.ts.map +1 -0
- package/lib/exercises/vea/equationVEA.js +24 -0
- package/lib/exercises/vea/rationalVEA.d.ts.map +1 -1
- package/lib/exercises/vea/sqrtVEA.d.ts +6 -0
- package/lib/exercises/vea/sqrtVEA.d.ts.map +1 -0
- package/lib/exercises/vea/sqrtVEA.js +30 -0
- package/lib/geogebra/geogebraConstructor.d.ts +2 -0
- package/lib/geogebra/geogebraConstructor.d.ts.map +1 -1
- package/lib/geogebra/geogebraConstructor.js +7 -0
- package/lib/index.d.ts +28 -46
- package/lib/index.d.ts.map +1 -1
- package/lib/math/complex/complex.d.ts +1 -1
- package/lib/math/geometry/angle.d.ts +26 -0
- package/lib/math/geometry/angle.d.ts.map +1 -0
- package/lib/math/geometry/angle.js +73 -0
- package/lib/math/geometry/line.d.ts +5 -1
- package/lib/math/geometry/line.d.ts.map +1 -1
- package/lib/math/geometry/line.js +17 -0
- package/lib/math/geometry/parallelogram.d.ts +23 -0
- package/lib/math/geometry/parallelogram.d.ts.map +1 -0
- package/lib/math/geometry/parallelogram.js +70 -0
- package/lib/math/geometry/point.d.ts +3 -0
- package/lib/math/geometry/point.d.ts.map +1 -1
- package/lib/math/geometry/point.js +16 -0
- package/lib/math/geometry/quadrilateral.d.ts +15 -0
- package/lib/math/geometry/quadrilateral.d.ts.map +1 -0
- package/lib/math/geometry/quadrilateral.js +38 -0
- package/lib/math/geometry/rectangle.d.ts +24 -0
- package/lib/math/geometry/rectangle.d.ts.map +1 -0
- package/lib/math/geometry/rectangle.js +64 -0
- package/lib/math/geometry/rhombus.d.ts +19 -0
- package/lib/math/geometry/rhombus.d.ts.map +1 -0
- package/lib/math/geometry/rhombus.js +46 -0
- package/lib/math/geometry/rightTriangle.d.ts +31 -0
- package/lib/math/geometry/rightTriangle.d.ts.map +1 -0
- package/lib/math/geometry/rightTriangle.js +113 -0
- package/lib/math/geometry/segment.d.ts +24 -6
- package/lib/math/geometry/segment.d.ts.map +1 -1
- package/lib/math/geometry/segment.js +70 -4
- package/lib/math/geometry/square.d.ts +22 -0
- package/lib/math/geometry/square.d.ts.map +1 -0
- package/lib/math/geometry/square.js +43 -0
- package/lib/math/geometry/triangle.d.ts +45 -45
- package/lib/math/geometry/triangle.d.ts.map +1 -1
- package/lib/math/geometry/triangle.js +159 -186
- package/lib/math/geometry/vector.d.ts +2 -2
- package/lib/math/geometry/vector.d.ts.map +1 -1
- package/lib/math/geometry/vector.js +18 -9
- package/lib/math/numbers/rationals/rational.d.ts +1 -1
- package/lib/math/numbers/reals/extendedRingElement.d.ts +1 -1
- package/lib/math/numbers/reals/real.d.ts.map +1 -1
- package/lib/math/numbers/reals/real.js +3 -0
- package/lib/math/polynomials/generalAffine.d.ts.map +1 -1
- package/lib/math/polynomials/generalAffine.js +1 -1
- package/lib/math/polynomials/polynomial.d.ts +1 -1
- package/lib/math/polynomials/trinom.d.ts +2 -2
- package/lib/math/utils/geometry/pythagoricianTriplets.d.ts +1 -0
- package/lib/math/utils/geometry/pythagoricianTriplets.d.ts.map +1 -1
- package/lib/math/utils/geometry/pythagoricianTriplets.js +14 -1
- package/lib/math/utils/random/randfloat.d.ts +1 -1
- package/lib/math/utils/random/randfloat.d.ts.map +1 -1
- package/lib/math/utils/random/randfloat.js +8 -1
- package/lib/math/utils/random/randint.d.ts +8 -1
- package/lib/math/utils/random/randint.d.ts.map +1 -1
- package/lib/math/utils/random/randint.js +6 -1
- package/lib/playground.d.ts.map +1 -1
- package/lib/playground.js +1 -8
- package/lib/tree/nodes/functions/absNode.d.ts +1 -1
- package/lib/tree/nodes/functions/functionNode.d.ts +2 -2
- package/lib/tree/nodes/functions/functionNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/oppositeNode.d.ts +5 -5
- package/lib/tree/nodes/functions/oppositeNode.d.ts.map +1 -1
- package/lib/tree/nodes/node.d.ts +3 -1
- package/lib/tree/nodes/node.d.ts.map +1 -1
- package/lib/tree/nodes/node.js +1 -0
- package/lib/tree/nodes/nodeConstructor.d.ts.map +1 -1
- package/lib/tree/nodes/nodeConstructor.js +4 -0
- package/lib/tree/nodes/numbers/numberNode.d.ts +2 -0
- package/lib/tree/nodes/numbers/numberNode.d.ts.map +1 -1
- package/lib/tree/nodes/numbers/numberNode.js +6 -1
- package/lib/tree/nodes/operators/addNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/addNode.js +2 -1
- package/lib/tree/nodes/operators/multiplyNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/multiplyNode.js +3 -3
- package/lib/tree/nodes/polynomials/trinomNode.d.ts +70 -0
- package/lib/tree/nodes/polynomials/trinomNode.d.ts.map +1 -0
- package/lib/tree/nodes/polynomials/trinomNode.js +156 -0
- package/lib/tree/nodes/variables/variableNode.d.ts.map +1 -1
- package/lib/tree/nodes/variables/variableNode.js +1 -1
- package/lib/tree/parsers/affineParser.d.ts.map +1 -1
- package/lib/tree/parsers/affineParser.js +1 -0
- package/lib/tree/parsers/discreteSetParser.d.ts +3 -0
- package/lib/tree/parsers/discreteSetParser.d.ts.map +1 -0
- package/lib/tree/parsers/discreteSetParser.js +23 -0
- package/lib/tree/parsers/equationSolutionParser.d.ts +1 -1
- package/lib/tree/parsers/equationSolutionParser.d.ts.map +1 -1
- package/lib/tree/parsers/equationSolutionParser.js +15 -4
- package/lib/tree/parsers/latexParser.d.ts +5 -1
- package/lib/tree/parsers/latexParser.d.ts.map +1 -1
- package/lib/tree/parsers/latexParser.js +17 -3
- package/lib/tree/parsers/monomParser.js +2 -2
- package/lib/tree/parsers/powerParser.d.ts +1 -1
- package/lib/tree/parsers/rationalParser.d.ts +1 -1
- package/lib/tree/parsers/rationalParser.d.ts.map +1 -1
- package/lib/tree/parsers/rationalParser.js +28 -24
- package/lib/tree/parsers/sqrtParser.d.ts +9 -0
- package/lib/tree/parsers/sqrtParser.d.ts.map +1 -0
- package/lib/tree/parsers/sqrtParser.js +52 -0
- package/lib/tree/parsers/trinomParser.d.ts +1 -1
- package/lib/tree/parsers/trinomParser.d.ts.map +1 -1
- package/lib/tree/parsers/trinomParser.js +14 -2
- package/lib/tree/utilities/functionComposition.d.ts +1 -1
- package/lib/tree/utilities/functionComposition.d.ts.map +1 -1
- package/lib/utils/arrays/rotation.d.ts +8 -0
- package/lib/utils/arrays/rotation.d.ts.map +1 -0
- package/lib/utils/arrays/rotation.js +17 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trigonometryAngleCalcul.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/trigonometry/trigonometryAngleCalcul.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"trigonometryAngleCalcul.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/trigonometry/trigonometryAngleCalcul.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAIlC,OAAO,EAEL,mBAAmB,EACpB,MAAM,8BAA8B,CAAC;AAOtC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,mBAAmB,EAAE,mBAAmB,CAAC;CAC1C,CAAC;AAyDF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAezD,CAAC"}
|
|
@@ -4,51 +4,41 @@ exports.trigonometryAngleCalcul = void 0;
|
|
|
4
4
|
const exercise_1 = require("../../../exercises/exercise");
|
|
5
5
|
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
6
6
|
const geogebraConstructor_1 = require("../../../geogebra/geogebraConstructor");
|
|
7
|
-
const
|
|
7
|
+
const rightTriangle_1 = require("../../../math/geometry/rightTriangle");
|
|
8
8
|
const randint_1 = require("../../../math/utils/random/randint");
|
|
9
9
|
const round_1 = require("../../../math/utils/round");
|
|
10
10
|
const shuffle_1 = require("../../../utils/alea/shuffle");
|
|
11
11
|
const getTrigonometryAngleCalcul = () => {
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
for (let i = 0; i < 3; i++)
|
|
15
|
-
vertices.push(String.fromCharCode(code + i));
|
|
16
|
-
const triangle = triangle_1.TriangleConstructor.createRandomRightTriangle({
|
|
17
|
-
minRapport: 0.5,
|
|
18
|
-
maxRapport: 1.5,
|
|
19
|
-
names: vertices,
|
|
12
|
+
const triangle = rightTriangle_1.RightTriangleConstructor.randomNiceSides({
|
|
13
|
+
randomName: true,
|
|
20
14
|
});
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
const
|
|
27
|
-
triangle.getSideCnumber(),
|
|
28
|
-
triangle.getSideBnumber(),
|
|
29
|
-
triangle.getSideAnumber(),
|
|
30
|
-
].map((el) => (0, round_1.round)(el / 2, 2));
|
|
31
|
-
const angle = [triangle.vertexB.name, triangle.vertexC.name];
|
|
32
|
-
const randAngle = (0, randint_1.randint)(0, 2);
|
|
33
|
-
const randSides = (0, shuffle_1.shuffle)([0, 1, 2]);
|
|
34
|
-
const answer = randAngle === 0
|
|
35
|
-
? Math.round((Math.acos(sideLengths[0] / sideLengths[2]) * 180) / Math.PI)
|
|
36
|
-
: Math.round((Math.acos(sideLengths[1] / sideLengths[2]) * 180) / Math.PI);
|
|
15
|
+
const randAngle = (0, randint_1.randint)(1, 3);
|
|
16
|
+
const hiddenSide = (0, randint_1.randint)(0, 3);
|
|
17
|
+
const givenSides = triangle.sides.filter((s, i) => i !== hiddenSide);
|
|
18
|
+
triangle.showSidesLength([hiddenSide]);
|
|
19
|
+
triangle.highlightAngle(randAngle, { color: "red" });
|
|
20
|
+
const answer = (0, round_1.round)(triangle.angles[randAngle].evaluate(), 0);
|
|
37
21
|
const answerTex = answer + "^{\\circ}";
|
|
38
22
|
const ggb = new geogebraConstructor_1.GeogebraConstructor({
|
|
39
|
-
commands: triangle.
|
|
23
|
+
commands: triangle.commands,
|
|
40
24
|
hideAxes: true,
|
|
41
25
|
hideGrid: true,
|
|
42
26
|
});
|
|
43
27
|
const question = {
|
|
44
|
-
instruction: `Le triangle $${triangle.
|
|
28
|
+
instruction: `Le triangle $${triangle.name}$ rectangle en $${triangle.points[0].name}$ est tel que $${givenSides[0].toLengthTex()}$ cm et $${givenSides[1].toLengthTex()}$ cm.
|
|
29
|
+
|
|
30
|
+
Calculer $\\widehat{${triangle.points[randAngle].name}}$ à $1^\\circ$ près.`,
|
|
45
31
|
answer: answerTex,
|
|
46
32
|
keys: ["degree"],
|
|
47
33
|
ggbOptions: ggb.getOptions({
|
|
48
34
|
coords: triangle.generateCoords(),
|
|
49
35
|
}),
|
|
50
36
|
answerFormat: "tex",
|
|
51
|
-
identifiers: {
|
|
37
|
+
identifiers: {
|
|
38
|
+
randAngle,
|
|
39
|
+
hiddenSide,
|
|
40
|
+
triangleIdentifiers: triangle.toIdentifiers(),
|
|
41
|
+
},
|
|
52
42
|
};
|
|
53
43
|
return question;
|
|
54
44
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Exercise } from "../../../exercises/exercise";
|
|
2
|
+
import { TriangleIdentifiers } from "../../../math/geometry/triangle";
|
|
2
3
|
type Identifiers = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
sideAsked: number;
|
|
5
|
+
givenSide: number;
|
|
6
|
+
givenAngle: number;
|
|
7
|
+
triangleIdentifiers: TriangleIdentifiers;
|
|
7
8
|
};
|
|
8
9
|
export declare const trigonometrySideCalcul: Exercise<Identifiers>;
|
|
9
10
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trigonometrySideCalcul.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/trigonometry/trigonometrySideCalcul.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"trigonometrySideCalcul.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/trigonometry/trigonometrySideCalcul.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAQlC,OAAO,EAEL,mBAAmB,EACpB,MAAM,8BAA8B,CAAC;AAMtC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,mBAAmB,EAAE,mBAAmB,CAAC;CAC1C,CAAC;AA4KF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAexD,CAAC"}
|
|
@@ -3,66 +3,50 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.trigonometrySideCalcul = void 0;
|
|
4
4
|
const exercise_1 = require("../../../exercises/exercise");
|
|
5
5
|
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const colors_1 = require("../../../geogebra/colors");
|
|
6
7
|
const geogebraConstructor_1 = require("../../../geogebra/geogebraConstructor");
|
|
7
|
-
const
|
|
8
|
+
const rightTriangle_1 = require("../../../math/geometry/rightTriangle");
|
|
8
9
|
const randint_1 = require("../../../math/utils/random/randint");
|
|
9
10
|
const round_1 = require("../../../math/utils/round");
|
|
10
11
|
const numberNode_1 = require("../../../tree/nodes/numbers/numberNode");
|
|
11
12
|
const shuffle_1 = require("../../../utils/alea/shuffle");
|
|
12
13
|
const getTrigonometrySideCalcul = () => {
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
maxRapport: 1.5,
|
|
20
|
-
names: vertices,
|
|
14
|
+
const givenAngle = (0, randint_1.randint)(1, 3);
|
|
15
|
+
const givenSide = (0, randint_1.randint)(0, 3);
|
|
16
|
+
const sideAsked = (0, randint_1.randint)(0, 3, [givenSide]);
|
|
17
|
+
const triangle = rightTriangle_1.RightTriangleConstructor.randomNiceAngles({
|
|
18
|
+
randomName: true,
|
|
19
|
+
niceSideIndex: givenSide,
|
|
21
20
|
});
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
];
|
|
27
|
-
const sideLengths = [
|
|
28
|
-
triangle.getSideCnumber(),
|
|
29
|
-
triangle.getSideBnumber(),
|
|
30
|
-
triangle.getSideAnumber(),
|
|
31
|
-
].map((el) => (0, round_1.round)(el / 2, 2));
|
|
32
|
-
const angle = [triangle.vertexB.name, triangle.vertexC.name];
|
|
33
|
-
const randAngle = (0, randint_1.randint)(0, 2);
|
|
34
|
-
const randSide = (0, randint_1.randint)(0, 3); // valeurs possible : 0 1 2
|
|
35
|
-
const randSideQuestion = (0, randint_1.randint)(0, 3, [randSide]); // si rand = 0, valeurs possible 1 2
|
|
36
|
-
const angleValue = [
|
|
37
|
-
(0, round_1.round)((Math.acos(sideLengths[0] / sideLengths[2]) * 180) / Math.PI, 1),
|
|
38
|
-
(0, round_1.round)((Math.acos(sideLengths[1] / sideLengths[2]) * 180) / Math.PI, 1),
|
|
39
|
-
];
|
|
40
|
-
const commands = [
|
|
41
|
-
...triangle.generateCommands({
|
|
42
|
-
highlightedAngle: angle[randAngle],
|
|
43
|
-
colorHighlightedAngle: "Black",
|
|
44
|
-
showLabels: [sides[randSideQuestion]],
|
|
45
|
-
setCaptions: ["?"],
|
|
46
|
-
highlightedSide: sides[randSideQuestion],
|
|
47
|
-
}),
|
|
48
|
-
];
|
|
21
|
+
triangle.showSidesLength([0, 1, 2].filter((i) => i !== givenSide));
|
|
22
|
+
triangle.highlightAngle(givenAngle, { color: colors_1.greenDark, showValue: true });
|
|
23
|
+
triangle.highlightSide(sideAsked, { color: "red", caption: "?" });
|
|
24
|
+
const angleValue = triangle.angles[givenAngle].evaluate().frenchify();
|
|
49
25
|
const ggb = new geogebraConstructor_1.GeogebraConstructor({
|
|
50
|
-
commands,
|
|
26
|
+
commands: triangle.commands,
|
|
51
27
|
hideAxes: true,
|
|
52
28
|
hideGrid: true,
|
|
53
29
|
});
|
|
54
|
-
const answer =
|
|
30
|
+
const answer = (0, round_1.round)(triangle.sides[sideAsked].getLength(), 1).frenchify();
|
|
31
|
+
const identifiers = {
|
|
32
|
+
givenAngle,
|
|
33
|
+
givenSide,
|
|
34
|
+
sideAsked,
|
|
35
|
+
triangleIdentifiers: triangle.toIdentifiers(),
|
|
36
|
+
};
|
|
55
37
|
const question = {
|
|
56
|
-
instruction: `Le triangle $${triangle.
|
|
38
|
+
instruction: `Le triangle $${triangle.name}$ rectangle en $${triangle.points[0].name}$ est tel que $${triangle.sides[givenSide].toLengthTex()}$ cm et $\\widehat{${triangle.points[givenAngle].name}} = ${angleValue}^\\circ$.
|
|
39
|
+
|
|
40
|
+
Calculer $${triangle.sides[sideAsked].toInsideName()}$ à $0,1$ cm près.`,
|
|
57
41
|
answer,
|
|
58
|
-
hint: getHint(),
|
|
59
|
-
correction: getCorrection(
|
|
42
|
+
// hint: getHint(identifiers),
|
|
43
|
+
// correction: getCorrection(identifiers),
|
|
60
44
|
keys: [],
|
|
61
45
|
ggbOptions: ggb.getOptions({
|
|
62
46
|
coords: triangle.generateCoords(),
|
|
63
47
|
}),
|
|
64
48
|
answerFormat: "tex",
|
|
65
|
-
identifiers
|
|
49
|
+
identifiers,
|
|
66
50
|
};
|
|
67
51
|
return question;
|
|
68
52
|
};
|
|
@@ -74,21 +58,42 @@ const getPropositions = (n, { answer }) => {
|
|
|
74
58
|
}
|
|
75
59
|
return (0, shuffle_1.shuffle)(propositions);
|
|
76
60
|
};
|
|
77
|
-
const getHint = () => {
|
|
61
|
+
const getHint = (identifiers) => {
|
|
78
62
|
return `Identifier le côté opposé, le côté adjacent et l'hypoténuse, puis utiliser la bonne formule de trigonométrie.`;
|
|
79
63
|
};
|
|
80
|
-
const getCorrection = (
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
64
|
+
// const getCorrection: GetCorrection<Identifiers> = (identifiers) => {
|
|
65
|
+
// const hypothenus = { name: sides[2], length: sideLengths[2] };
|
|
66
|
+
// const sidesWithLentgh = sides.map((value, index) => {
|
|
67
|
+
// return { name: value, length: sideLengths[index] };
|
|
68
|
+
// });
|
|
69
|
+
// const adjacent = sidesWithLentgh.filter(
|
|
70
|
+
// (value) =>
|
|
71
|
+
// value.name !== hypothenus.name &&
|
|
72
|
+
// [value.name.charAt(0), value.name.charAt(1)].includes(angle),
|
|
73
|
+
// )[0];
|
|
74
|
+
// const opposite = sidesWithLentgh.filter(
|
|
75
|
+
// (value) => value.name !== hypothenus.name && value.name !== adjacent.name,
|
|
76
|
+
// )[0];
|
|
77
|
+
// const correctEquations = getCorrectEquations(
|
|
78
|
+
// { name: sides[randSideQuestion], length: sideLengths[randSideQuestion] },
|
|
79
|
+
// { name: sides[randSide], length: sideLengths[randSide] },
|
|
80
|
+
// hypothenus,
|
|
81
|
+
// { name: angle, value: angleValue },
|
|
82
|
+
// adjacent,
|
|
83
|
+
// opposite,
|
|
84
|
+
// answer,
|
|
85
|
+
// );
|
|
86
|
+
// return `On utilise la relation :
|
|
87
|
+
// $$
|
|
88
|
+
// ${correctEquations[0]}
|
|
89
|
+
// $$
|
|
90
|
+
// On a donc :
|
|
91
|
+
// $$
|
|
92
|
+
// ${correctEquations[1]}
|
|
93
|
+
// $$
|
|
94
|
+
// donc
|
|
95
|
+
// $$${correctEquations[2]}$$. Ainsi $${correctEquations[3]}$ `;
|
|
96
|
+
// };
|
|
92
97
|
const getCorrectEquations = (randSideQuestion, randSide, hypothenus, angle, adjacent, opposite, answer) => {
|
|
93
98
|
let result;
|
|
94
99
|
switch (randSideQuestion.name) {
|
|
@@ -157,5 +162,4 @@ exports.trigonometrySideCalcul = {
|
|
|
157
162
|
isAnswerValid,
|
|
158
163
|
hasGeogebra: true,
|
|
159
164
|
subject: "Mathématiques",
|
|
160
|
-
hasHintAndCorrection: true,
|
|
161
165
|
};
|
|
@@ -47,8 +47,6 @@ export * from "../math/geometry/vectors/scalarProduct/scalarProductViaCoords";
|
|
|
47
47
|
export * from "../math/geometry/vectors/scalarProduct/scalarProductViaCos";
|
|
48
48
|
export * from "../math/geometry/vectors/coordinatesReading";
|
|
49
49
|
export * from "../math/functions/affines/affineExpressionReading";
|
|
50
|
-
export * from "../math/geometry/thales/thales";
|
|
51
|
-
export * from "../math/geometry/thales/thalesCalcul";
|
|
52
50
|
export * from "../math/equaDiff/equaDiffCheckSolutionFirstOrder";
|
|
53
51
|
export * from "../math/equaDiff/equaDiffGeneralForme";
|
|
54
52
|
export * from "../math/equaDiff/equaDiffGeneralFormeWithIC";
|
|
@@ -57,6 +55,4 @@ export * from "../math/derivation/derivative/usualderivative";
|
|
|
57
55
|
export { thirdDegreeDerivative } from "../math/derivation/derivative/thirdDegreeDerivative";
|
|
58
56
|
export { firstDegreeDerivative } from "../math/derivation/derivative/firstDegreeDerivative";
|
|
59
57
|
export { secondDegreeDerivative } from "../math/derivation/derivative/secondDegreeDerivative";
|
|
60
|
-
export * from "../math/trigonometry/trigonometrySideCalcul";
|
|
61
|
-
export * from "../math/trigonometry/trigonometryAngleCalcul";
|
|
62
58
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,YAAY,CAAC;AAC3B,cAAc,0BAA0B,CAAC;AACzC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,MAAM,CAAC;AACrB,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,C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AA6C,CAAC;AAC5D,cAAc,oDAAoD,CAAC;AACnE,cAAc,+CAA+C,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,qDAAqD,CAAC;AAC5F,OAAO,EAAE,qBAAqB,EAAE,MAAM,qDAAqD,CAAC;AAC5F,OAAO,EAAE,sBAAsB,EAAE,MAAM,sDAAsD,CAAC"}
|
|
@@ -68,8 +68,9 @@ __exportStar(require("../math/geometry/vectors/scalarProduct/scalarProductViaCoo
|
|
|
68
68
|
__exportStar(require("../math/geometry/vectors/scalarProduct/scalarProductViaCos"), exports);
|
|
69
69
|
__exportStar(require("../math/geometry/vectors/coordinatesReading"), exports);
|
|
70
70
|
__exportStar(require("../math/functions/affines/affineExpressionReading"), exports);
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
//!FIX TRIANGLE
|
|
72
|
+
// export * from "../math/geometry/thales/thales";
|
|
73
|
+
// export * from "../math/geometry/thales/thalesCalcul";
|
|
73
74
|
__exportStar(require("../math/equaDiff/equaDiffCheckSolutionFirstOrder"), exports);
|
|
74
75
|
__exportStar(require("../math/equaDiff/equaDiffGeneralForme"), exports);
|
|
75
76
|
__exportStar(require("../math/equaDiff/equaDiffGeneralFormeWithIC"), exports);
|
|
@@ -81,5 +82,6 @@ var firstDegreeDerivative_1 = require("../math/derivation/derivative/firstDegree
|
|
|
81
82
|
Object.defineProperty(exports, "firstDegreeDerivative", { enumerable: true, get: function () { return firstDegreeDerivative_1.firstDegreeDerivative; } });
|
|
82
83
|
var secondDegreeDerivative_1 = require("../math/derivation/derivative/secondDegreeDerivative");
|
|
83
84
|
Object.defineProperty(exports, "secondDegreeDerivative", { enumerable: true, get: function () { return secondDegreeDerivative_1.secondDegreeDerivative; } });
|
|
84
|
-
|
|
85
|
-
|
|
85
|
+
// export * from "../math/trigonometry/trigonometrySideCalcul";
|
|
86
|
+
// export * from "../math/trigonometry/trigonometryAngleCalcul";
|
|
87
|
+
//!FIX TRIANGLE
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toGGBCommandsProps.d.ts","sourceRoot":"","sources":["../../../../src/exercises/utils/geogebra/toGGBCommandsProps.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"toGGBCommandsProps.d.ts","sourceRoot":"","sources":["../../../../src/exercises/utils/geogebra/toGGBCommandsProps.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"equationVEA.d.ts","sourceRoot":"","sources":["../../../src/exercises/vea/equationVEA.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,WAAW,QAAS,MAAM,eAAe,MAAM,YAa3D,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.equationVEA = void 0;
|
|
4
|
+
const discreteSetParser_1 = require("../../tree/parsers/discreteSetParser");
|
|
5
|
+
const equationSolutionParser_1 = require("../../tree/parsers/equationSolutionParser");
|
|
6
|
+
const rationalVEA_1 = require("./rationalVEA");
|
|
7
|
+
const equationVEA = (ans, solutionTex) => {
|
|
8
|
+
try {
|
|
9
|
+
let parsed = (0, equationSolutionParser_1.equationSolutionParser)(ans);
|
|
10
|
+
if (parsed) {
|
|
11
|
+
return (0, rationalVEA_1.rationalVEA)(parsed.toTex(), solutionTex);
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
const setParsed = (0, discreteSetParser_1.discreteSetParser)(ans);
|
|
15
|
+
if (!setParsed || setParsed.length !== 1)
|
|
16
|
+
return false;
|
|
17
|
+
return (0, rationalVEA_1.rationalVEA)(setParsed[0].toTex(), solutionTex);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
catch (err) {
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
exports.equationVEA = equationVEA;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rationalVEA.d.ts","sourceRoot":"","sources":["../../../src/exercises/vea/rationalVEA.ts"],"names":[],"mappings":"AAKA,KAAK,IAAI,GAAG;IACV,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AACF,eAAO,MAAM,WAAW,eACV,MAAM,UACV,MAAM,6DAC4C,IAAI,
|
|
1
|
+
{"version":3,"file":"rationalVEA.d.ts","sourceRoot":"","sources":["../../../src/exercises/vea/rationalVEA.ts"],"names":[],"mappings":"AAKA,KAAK,IAAI,GAAG;IACV,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AACF,eAAO,MAAM,WAAW,eACV,MAAM,UACV,MAAM,6DAC4C,IAAI,YAoC/D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sqrtVEA.d.ts","sourceRoot":"","sources":["../../../src/exercises/vea/sqrtVEA.ts"],"names":[],"mappings":"AAMA,KAAK,IAAI,GAAG;IACV,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC,CAAC;AACF,eAAO,MAAM,OAAO,eACN,MAAM,UACV,MAAM,6BACY,IAAI,YAmB/B,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sqrtVEA = void 0;
|
|
4
|
+
const numberNode_1 = require("../../tree/nodes/numbers/numberNode");
|
|
5
|
+
const latexParser_1 = require("../../tree/parsers/latexParser");
|
|
6
|
+
const sqrtParser_1 = require("../../tree/parsers/sqrtParser");
|
|
7
|
+
const sqrtVEA = (studentAns, answer, { allowNonIrreductible } = {
|
|
8
|
+
allowNonIrreductible: true,
|
|
9
|
+
}) => {
|
|
10
|
+
try {
|
|
11
|
+
allowNonIrreductible = allowNonIrreductible ?? true;
|
|
12
|
+
const parsed = (0, sqrtParser_1.sqrtParser)(studentAns);
|
|
13
|
+
if (!parsed)
|
|
14
|
+
return false;
|
|
15
|
+
const parsedAnswer = (0, latexParser_1.parseAlgebraic)(answer);
|
|
16
|
+
if ((0, numberNode_1.isNumberNode)(parsed)) {
|
|
17
|
+
return Math.abs(parsed.evaluate() - parsedAnswer.evaluate()) < 0.0000001;
|
|
18
|
+
}
|
|
19
|
+
else if (allowNonIrreductible) {
|
|
20
|
+
return Math.abs(parsed.evaluate() - parsedAnswer.evaluate()) < 0.0000001;
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
return parsed.equals(parsedAnswer);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
catch (err) {
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
exports.sqrtVEA = sqrtVEA;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { GeogebraAxisOptions, GeogebraOptions } from "../exercises/exercise";
|
|
2
|
+
import { Point } from "../math/geometry/point";
|
|
2
3
|
type GetAdaptedCoords = {
|
|
3
4
|
xMin: number;
|
|
4
5
|
xMax: number;
|
|
@@ -25,6 +26,7 @@ export declare class GeogebraConstructor {
|
|
|
25
26
|
xAxis?: GeogebraAxisOptions;
|
|
26
27
|
yAxis?: GeogebraAxisOptions;
|
|
27
28
|
constructor(options: Omit<GeogebraOptions, "coords">);
|
|
29
|
+
getCoordsForPoints(points: Point[]): number[];
|
|
28
30
|
getAdaptedCoords({ xMin, xMax, yMin, yMax, zMin, zMax, forceShowAxes, }: GetAdaptedCoords): number[];
|
|
29
31
|
getOptions({ coords }: GetOptionsProps): GeogebraOptions;
|
|
30
32
|
}
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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;AAEhF,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAElD,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;IAcpD,kBAAkB,CAAC,MAAM,EAAE,KAAK,EAAE;IAOlC,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"}
|
|
@@ -17,6 +17,13 @@ class GeogebraConstructor {
|
|
|
17
17
|
this.xAxis = options?.xAxis;
|
|
18
18
|
this.yAxis = options?.yAxis;
|
|
19
19
|
}
|
|
20
|
+
getCoordsForPoints(points) {
|
|
21
|
+
const xMin = Math.min(...points.map((p) => p.x.evaluate()));
|
|
22
|
+
const xMax = Math.max(...points.map((p) => p.x.evaluate()));
|
|
23
|
+
const yMin = Math.min(...points.map((p) => p.y.evaluate()));
|
|
24
|
+
const yMax = Math.max(...points.map((p) => p.y.evaluate()));
|
|
25
|
+
return this.getAdaptedCoords({ xMin, xMax, yMin, yMax });
|
|
26
|
+
}
|
|
20
27
|
getAdaptedCoords({ xMin, xMax, yMin, yMax, zMin, zMax, forceShowAxes, }) {
|
|
21
28
|
const showAxes = forceShowAxes ?? (this.hideAxes ? false : true);
|
|
22
29
|
const xDelta = xMax - xMin;
|
package/lib/index.d.ts
CHANGED
|
@@ -324,6 +324,9 @@ declare const mathExercises: (Exercise<{
|
|
|
324
324
|
c: number;
|
|
325
325
|
d: number;
|
|
326
326
|
isSubstract: boolean;
|
|
327
|
+
}, {}> | Exercise<{
|
|
328
|
+
a: number;
|
|
329
|
+
b: number;
|
|
327
330
|
}, {}> | Exercise<{
|
|
328
331
|
b: number;
|
|
329
332
|
c: number;
|
|
@@ -798,11 +801,11 @@ declare const mathExercises: (Exercise<{
|
|
|
798
801
|
cIdentifiers: import("./tree/nodes/nodeConstructor").NodeIdentifiers;
|
|
799
802
|
isAsking: string;
|
|
800
803
|
}, {}> | Exercise<{
|
|
801
|
-
trinomIdentifiers: import("./
|
|
804
|
+
trinomIdentifiers: import("./tree/nodes/polynomials/trinomNode").TrinomNodeIdentifiers;
|
|
802
805
|
}, {}> | Exercise<{
|
|
803
|
-
trinomIdentifiers: import("./
|
|
806
|
+
trinomIdentifiers: import("./tree/nodes/polynomials/trinomNode").TrinomNodeIdentifiers;
|
|
804
807
|
}, {}> | Exercise<{
|
|
805
|
-
trinomIdentifiers: import("./
|
|
808
|
+
trinomIdentifiers: import("./tree/nodes/polynomials/trinomNode").TrinomNodeIdentifiers;
|
|
806
809
|
firstRootIdentifiers: import("./tree/nodes/nodeConstructor").NodeIdentifiers;
|
|
807
810
|
}, {}> | Exercise<{
|
|
808
811
|
a: number;
|
|
@@ -893,10 +896,14 @@ declare const mathExercises: (Exercise<{
|
|
|
893
896
|
length: number;
|
|
894
897
|
width: number;
|
|
895
898
|
}, {}> | Exercise<{
|
|
896
|
-
|
|
899
|
+
triangleIdentifiers: import("./math/geometry/triangle").TriangleIdentifiers;
|
|
897
900
|
}, {}> | Exercise<{
|
|
898
901
|
side: number;
|
|
899
|
-
}, {}> | Exercise<{
|
|
902
|
+
}, {}> | Exercise<{
|
|
903
|
+
triangleIdentifiers: import("./math/geometry/triangle").TriangleIdentifiers;
|
|
904
|
+
height: number;
|
|
905
|
+
base: number;
|
|
906
|
+
}, {}> | Exercise<{
|
|
900
907
|
randomSide: number;
|
|
901
908
|
}, {}> | Exercise<{
|
|
902
909
|
area: number;
|
|
@@ -982,13 +989,9 @@ declare const mathExercises: (Exercise<{
|
|
|
982
989
|
}, {}> | Exercise<{
|
|
983
990
|
perimeter: number;
|
|
984
991
|
}, {}> | Exercise<{
|
|
985
|
-
sideA: string;
|
|
986
|
-
sideB: string;
|
|
987
|
-
sideC: string;
|
|
988
992
|
triangleIdentifiers: import("./math/geometry/triangle").TriangleIdentifiers;
|
|
989
993
|
}, {}> | Exercise<{
|
|
990
|
-
|
|
991
|
-
sideLengths: number[];
|
|
994
|
+
sideAsked: number;
|
|
992
995
|
triangleIdentifiers: import("./math/geometry/triangle").TriangleIdentifiers;
|
|
993
996
|
}, {}> | Exercise<{
|
|
994
997
|
isRight: boolean;
|
|
@@ -1006,9 +1009,10 @@ declare const mathExercises: (Exercise<{
|
|
|
1006
1009
|
yC: number;
|
|
1007
1010
|
factor: number;
|
|
1008
1011
|
}, {}> | Exercise<{
|
|
1012
|
+
ratio: number;
|
|
1009
1013
|
triangleIdentifiers: import("./math/geometry/triangle").TriangleIdentifiers;
|
|
1010
|
-
|
|
1011
|
-
|
|
1014
|
+
insidePointsNames: string[];
|
|
1015
|
+
segmentAskedName: string;
|
|
1012
1016
|
isPapillon: boolean;
|
|
1013
1017
|
}, {
|
|
1014
1018
|
configurationType: string;
|
|
@@ -1166,6 +1170,11 @@ declare const mathExercises: (Exercise<{
|
|
|
1166
1170
|
}, {}> | Exercise<{
|
|
1167
1171
|
startPoint: number[];
|
|
1168
1172
|
vector: number[];
|
|
1173
|
+
}, {}> | Exercise<{
|
|
1174
|
+
shape: string;
|
|
1175
|
+
showDiagonals: boolean;
|
|
1176
|
+
drawAngles: boolean;
|
|
1177
|
+
shapeIdentifiers: import("./math/geometry/parallelogram").ParallelogramIdentifiers | import("./math/geometry/rhombus").RhombusIdentifiers | import("./math/geometry/rectangle").RectangleIdentifiers | import("./math/geometry/square").SquareIdentifiers;
|
|
1169
1178
|
}, {}> | Exercise<{
|
|
1170
1179
|
coeffs: number[];
|
|
1171
1180
|
to: string;
|
|
@@ -1618,20 +1627,18 @@ declare const mathExercises: (Exercise<{
|
|
|
1618
1627
|
mainValue: number;
|
|
1619
1628
|
isCos: boolean;
|
|
1620
1629
|
}, {}> | Exercise<{
|
|
1621
|
-
sideA: string;
|
|
1622
|
-
sideB: string;
|
|
1623
|
-
sideC: string;
|
|
1624
1630
|
randAngle: number;
|
|
1625
1631
|
randTrigo: number;
|
|
1632
|
+
triangleIdentifiers: import("./math/geometry/triangle").TriangleIdentifiers;
|
|
1626
1633
|
}, {}> | Exercise<{
|
|
1627
|
-
sideLengths: number[];
|
|
1628
1634
|
randAngle: number;
|
|
1629
|
-
|
|
1635
|
+
hiddenSide: number;
|
|
1636
|
+
triangleIdentifiers: import("./math/geometry/triangle").TriangleIdentifiers;
|
|
1630
1637
|
}, {}> | Exercise<{
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1638
|
+
sideAsked: number;
|
|
1639
|
+
givenSide: number;
|
|
1640
|
+
givenAngle: number;
|
|
1641
|
+
triangleIdentifiers: import("./math/geometry/triangle").TriangleIdentifiers;
|
|
1635
1642
|
}, {}> | Exercise<{
|
|
1636
1643
|
angleValue: number;
|
|
1637
1644
|
angleIdentifiers: import("./tree/nodes/nodeConstructor").NodeIdentifiers;
|
|
@@ -1782,22 +1789,6 @@ declare const pcExercises: (Exercise<{
|
|
|
1782
1789
|
signs: number[];
|
|
1783
1790
|
isLog10: boolean;
|
|
1784
1791
|
}, {}> | Exercise<{
|
|
1785
|
-
vertices: string[];
|
|
1786
|
-
xA: number;
|
|
1787
|
-
yA: number;
|
|
1788
|
-
xB: number;
|
|
1789
|
-
yB: number;
|
|
1790
|
-
xC: number;
|
|
1791
|
-
yC: number;
|
|
1792
|
-
factor: number;
|
|
1793
|
-
}, {}> | Exercise<{
|
|
1794
|
-
triangleIdentifiers: import("./math/geometry/triangle").TriangleIdentifiers;
|
|
1795
|
-
insidePointsIdentifiers: import("./math/geometry/point").PointIdentifiers[];
|
|
1796
|
-
segmentAsked: import("./math/geometry/segment").SegmentIdentifiers;
|
|
1797
|
-
isPapillon: boolean;
|
|
1798
|
-
}, {
|
|
1799
|
-
configurationType: string;
|
|
1800
|
-
}> | Exercise<{
|
|
1801
1792
|
xA: number;
|
|
1802
1793
|
xB: number;
|
|
1803
1794
|
yA: number;
|
|
@@ -1818,15 +1809,6 @@ declare const pcExercises: (Exercise<{
|
|
|
1818
1809
|
a: number;
|
|
1819
1810
|
b: number;
|
|
1820
1811
|
c: number;
|
|
1821
|
-
}, {}> | Exercise<{
|
|
1822
|
-
sideLengths: number[];
|
|
1823
|
-
randAngle: number;
|
|
1824
|
-
randSides: number[];
|
|
1825
|
-
}, {}> | Exercise<{
|
|
1826
|
-
sideLengths: number[];
|
|
1827
|
-
randAngle: number;
|
|
1828
|
-
randSide: number;
|
|
1829
|
-
randSideQuestion: number;
|
|
1830
1812
|
}, {}> | Exercise<{
|
|
1831
1813
|
reactionArray: import("./pc/constants/molecularChemistry/reaction").ReactionSpecies[];
|
|
1832
1814
|
}, {}> | Exercise<{
|
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,sBAAsB,CAAC;AAG1D,OAAO,yBAAyB,CAAC;AAEjC,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,sBAAsB,CAAC;AAG1D,OAAO,yBAAyB,CAAC;AAEjC,QAAA,MAAM,aAAa;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAA6B,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -18,7 +18,7 @@ export declare class Complex {
|
|
|
18
18
|
times(n: number): Complex;
|
|
19
19
|
opposite(): Complex;
|
|
20
20
|
conjugate(): Complex;
|
|
21
|
-
toArgumentTree():
|
|
21
|
+
toArgumentTree(): import("../../tree/nodes/numbers/constantNode").ConstantNode | NumberNode | FractionNode | OppositeNode<FractionNode> | undefined;
|
|
22
22
|
toModuleTree(): import("../../tree/nodes/algebraicNode").AlgebraicNode;
|
|
23
23
|
toTree(): ComplexNode;
|
|
24
24
|
}
|