math-exercises 3.0.47 → 3.0.49
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/addAndSub.d.ts +7 -1
- package/lib/exercises/math/calcul/addAndSub.d.ts.map +1 -1
- package/lib/exercises/math/calcul/addAndSub.js +26 -14
- package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq1.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq2.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq3.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/affineExpressionReading.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/affineExpressionReading.js +0 -1
- package/lib/exercises/math/functions/affines/index.d.ts +0 -1
- package/lib/exercises/math/functions/affines/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/index.js +0 -1
- package/lib/exercises/math/geometry/lines/cartesianEquationToReduced.d.ts +10 -0
- package/lib/exercises/math/geometry/lines/cartesianEquationToReduced.d.ts.map +1 -0
- package/lib/exercises/math/geometry/lines/cartesianEquationToReduced.js +171 -0
- package/lib/exercises/math/geometry/lines/findPointOnLineWithCartesianEquation.d.ts +9 -0
- package/lib/exercises/math/geometry/lines/findPointOnLineWithCartesianEquation.d.ts.map +1 -0
- package/lib/exercises/math/geometry/lines/findPointOnLineWithCartesianEquation.js +146 -0
- package/lib/exercises/math/geometry/lines/findPointOnLineWithReductEquation.d.ts +8 -0
- package/lib/exercises/math/geometry/lines/findPointOnLineWithReductEquation.d.ts.map +1 -0
- package/lib/exercises/math/geometry/lines/findPointOnLineWithReductEquation.js +99 -0
- package/lib/exercises/math/geometry/lines/index.d.ts +5 -0
- package/lib/exercises/math/geometry/lines/index.d.ts.map +1 -1
- package/lib/exercises/math/geometry/lines/index.js +5 -0
- package/lib/exercises/math/geometry/lines/isPointOnCartesianLine.d.ts +13 -0
- package/lib/exercises/math/geometry/lines/isPointOnCartesianLine.d.ts.map +1 -0
- package/lib/exercises/math/geometry/lines/isPointOnCartesianLine.js +118 -0
- package/lib/exercises/math/geometry/lines/isPointOnLine.d.ts +11 -0
- package/lib/exercises/math/geometry/lines/isPointOnLine.d.ts.map +1 -0
- package/lib/exercises/math/geometry/lines/isPointOnLine.js +94 -0
- package/lib/exercises/math/geometry/triangles/triangleThirdAngleValue.d.ts.map +1 -1
- package/lib/exercises/math/geometry/triangles/triangleThirdAngleValue.js +16 -4
- package/lib/exercises/math/probaStat/probabilityTree.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/etendueList.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/etendueList.js +46 -14
- package/lib/exercises/math/trigonometry/trigonometry.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/trigonometry.js +49 -22
- package/lib/exercises/math/trigonometry/trigonometryAngleCalcul.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/trigonometryAngleCalcul.js +44 -22
- package/lib/exercises/math/trigonometry/trigonometrySideCalcul.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/trigonometrySideCalcul.js +6 -3
- package/lib/index.d.ts +28 -7
- package/lib/index.d.ts.map +1 -1
- package/lib/math/geometry/triangles/triangle.js +2 -2
- package/lib/math/sequences/geometricSequence.js +2 -2
- package/lib/playground.d.ts.map +1 -1
- package/lib/playground.js +0 -6
- package/lib/tree/nodes/algebraicNode.d.ts +0 -1
- package/lib/tree/nodes/algebraicNode.d.ts.map +1 -1
- package/lib/tree/nodes/node.d.ts +1 -0
- package/lib/tree/nodes/node.d.ts.map +1 -1
- package/lib/tree/nodes/numbers/numberNode.d.ts.map +1 -1
- package/lib/tree/nodes/numbers/numberNode.js +4 -1
- package/lib/tree/nodes/operators/addNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/fractionNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/fractionNode.js +14 -25
- package/lib/tree/nodes/operators/multiplyNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/multiplyNode.js +7 -1
- package/lib/tree/nodes/operators/scalarProductNode.d.ts.map +1 -1
- package/lib/tree/nodes/polynomials/monomNode.js +1 -2
- package/lib/tree/parsers/pointParser.d.ts +3 -0
- package/lib/tree/parsers/pointParser.d.ts.map +1 -0
- package/lib/tree/parsers/pointParser.js +13 -0
- package/lib/tree/parsers/spacePointParser.d.ts.map +1 -1
- package/lib/tree/parsers/spacePointParser.js +2 -0
- package/package.json +1 -1
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { Exercise } from "../../exercise.js";
|
|
2
|
+
/**
|
|
3
|
+
* a±b±c±d
|
|
4
|
+
*/
|
|
2
5
|
type Identifiers = {
|
|
3
6
|
numbers: number[];
|
|
4
7
|
};
|
|
5
|
-
|
|
8
|
+
type Options = {
|
|
9
|
+
explicitWriting?: boolean;
|
|
10
|
+
};
|
|
11
|
+
export declare const addAndSubExercise: Exercise<Identifiers, Options>;
|
|
6
12
|
export {};
|
|
7
13
|
//# sourceMappingURL=addAndSub.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addAndSub.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/calcul/addAndSub.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"addAndSub.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/calcul/addAndSub.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,QAAQ,EAcT,MAAM,mBAAmB,CAAC;AAE3B;;GAEG;AAEH,KAAK,WAAW,GAAG;IAAE,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC;AAYzC,KAAK,OAAO,GAAG;IACb,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AAyEF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAgB5D,CAAC"}
|
|
@@ -4,11 +4,17 @@ import { randint } from "../../../math/utils/random/randint.js";
|
|
|
4
4
|
import { NumberNode } from "../../../tree/nodes/numbers/numberNode.js";
|
|
5
5
|
import { AddNode } from "../../../tree/nodes/operators/addNode.js";
|
|
6
6
|
import { shuffle } from "../../../utils/alea/shuffle.js";
|
|
7
|
-
import { addValidProp, tryToAddWrongProp, } from "../../exercise.js";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
import { GeneratorOptionTarget, GeneratorOptionType, addValidProp, tryToAddWrongProp, } from "../../exercise.js";
|
|
8
|
+
const options = [
|
|
9
|
+
{
|
|
10
|
+
id: "explicitWriting",
|
|
11
|
+
label: "Utiliser l'écriture explicite (parenthèses autour de chaque nombre)",
|
|
12
|
+
target: GeneratorOptionTarget.instruction,
|
|
13
|
+
type: GeneratorOptionType.checkbox,
|
|
14
|
+
defaultValue: false,
|
|
15
|
+
},
|
|
16
|
+
];
|
|
17
|
+
const getStatementNode = (identifiers, opts) => {
|
|
12
18
|
const { numbers } = identifiers;
|
|
13
19
|
const allNumbersNodes = numbers.map((nb) => new NumberNode(nb));
|
|
14
20
|
let statementTree = new AddNode(allNumbersNodes[0], allNumbersNodes[1]);
|
|
@@ -17,14 +23,16 @@ const getStatementNode = (identifiers) => {
|
|
|
17
23
|
}
|
|
18
24
|
return statementTree;
|
|
19
25
|
};
|
|
20
|
-
const getStartStatement = (identifiers) => {
|
|
21
|
-
return getStatementNode(identifiers).toTex(
|
|
26
|
+
const getStartStatement = (identifiers, opts) => {
|
|
27
|
+
return getStatementNode(identifiers, opts).toTex({
|
|
28
|
+
explicitNumberWriting: opts?.explicitWriting,
|
|
29
|
+
});
|
|
22
30
|
};
|
|
23
|
-
const getInstruction = (identifiers) => {
|
|
31
|
+
const getInstruction = (identifiers, opts) => {
|
|
24
32
|
return `Calculer :
|
|
25
33
|
|
|
26
34
|
$$
|
|
27
|
-
${getStartStatement(identifiers)}
|
|
35
|
+
${getStartStatement(identifiers, opts)}
|
|
28
36
|
$$`;
|
|
29
37
|
};
|
|
30
38
|
const getAnswer = (identifiers) => {
|
|
@@ -32,17 +40,20 @@ const getAnswer = (identifiers) => {
|
|
|
32
40
|
const answer = numbers.reduce((a, b) => a + b) + "";
|
|
33
41
|
return answer;
|
|
34
42
|
};
|
|
35
|
-
const getAddAndSubQuestions = () => {
|
|
43
|
+
const getAddAndSubQuestions = (opts) => {
|
|
36
44
|
const nbOperations = randint(2, 4);
|
|
37
45
|
const numbers = [];
|
|
38
46
|
for (let i = 0; i < nbOperations + 1; i++) {
|
|
39
47
|
numbers.push(randint(-15, 15, [0]));
|
|
40
48
|
}
|
|
49
|
+
if (numbers.every((n) => n > 0)) {
|
|
50
|
+
numbers[randint(0, numbers.length)] *= -1;
|
|
51
|
+
}
|
|
41
52
|
const identifiers = { numbers };
|
|
42
53
|
const question = {
|
|
43
|
-
instruction: getInstruction(identifiers),
|
|
44
|
-
startStatement: getStartStatement(identifiers),
|
|
45
|
-
answer: getAnswer(identifiers),
|
|
54
|
+
instruction: getInstruction(identifiers, opts),
|
|
55
|
+
startStatement: getStartStatement(identifiers, opts),
|
|
56
|
+
answer: getAnswer(identifiers, opts),
|
|
46
57
|
keys: [],
|
|
47
58
|
answerFormat: "tex",
|
|
48
59
|
identifiers,
|
|
@@ -67,7 +78,7 @@ export const addAndSubExercise = {
|
|
|
67
78
|
connector: "=",
|
|
68
79
|
label: "Additions et soustractions de nombres entiers",
|
|
69
80
|
isSingleStep: true,
|
|
70
|
-
generator: (nb) => getDistinctQuestions(getAddAndSubQuestions, nb),
|
|
81
|
+
generator: (nb, opts) => getDistinctQuestions(() => getAddAndSubQuestions(opts), nb),
|
|
71
82
|
qcmTimer: 60,
|
|
72
83
|
freeTimer: 60,
|
|
73
84
|
getPropositions,
|
|
@@ -76,4 +87,5 @@ export const addAndSubExercise = {
|
|
|
76
87
|
getInstruction,
|
|
77
88
|
getAnswer,
|
|
78
89
|
getStartStatement,
|
|
90
|
+
options,
|
|
79
91
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factoIdRmq1.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/factorisation/factoIdRmq1.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"factoIdRmq1.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/factorisation/factoIdRmq1.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAsBrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAqIF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,CAkB7C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factoIdRmq2.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/factorisation/factoIdRmq2.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"factoIdRmq2.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/factorisation/factoIdRmq2.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAsBrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA+HF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,CAkB7C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factoIdRmq3.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/factorisation/factoIdRmq3.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"factoIdRmq3.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/factorisation/factoIdRmq3.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAkBrC,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB,CAAC;AAmKF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,CAkB7C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"affineExpressionReading.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/affineExpressionReading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAiBrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC;
|
|
1
|
+
{"version":3,"file":"affineExpressionReading.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/affineExpressionReading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAiBrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC;AAiIF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAezD,CAAC"}
|
|
@@ -11,5 +11,4 @@ export * from "./affineAdjustmentRsquared.js";
|
|
|
11
11
|
export * from "./affineAdjustmentComplete.js";
|
|
12
12
|
export * from "./affineMeanValue.js";
|
|
13
13
|
export * from "./affineExpressionFromTwoImages.js";
|
|
14
|
-
export * from "./isPointOnLine.js";
|
|
15
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC;AAChD,cAAc,mBAAmB,CAAC;AAClC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uBAAuB,CAAC;AACtC,cAAc,iCAAiC,CAAC;AAChD,cAAc,oCAAoC,CAAC;AACnD,cAAc,uBAAuB,CAAC;AACtC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,sBAAsB,CAAC;AACrC,cAAc,oCAAoC,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC;AAChD,cAAc,mBAAmB,CAAC;AAClC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uBAAuB,CAAC;AACtC,cAAc,iCAAiC,CAAC;AAChD,cAAc,oCAAoC,CAAC;AACnD,cAAc,uBAAuB,CAAC;AACtC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,sBAAsB,CAAC;AACrC,cAAc,oCAAoC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise.js";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
a: number;
|
|
4
|
+
b: number;
|
|
5
|
+
c: number;
|
|
6
|
+
toReduced: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare const cartesianEquationToReduced: Exercise<Identifiers>;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=cartesianEquationToReduced.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cartesianEquationToReduced.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/lines/cartesianEquationToReduced.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAcrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAoLF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAiB5D,CAAC"}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { RationalConstructor } from "../../../../math/numbers/rationals/rational.js";
|
|
4
|
+
import { gcd } from "../../../../math/utils/arithmetic/gcd.js";
|
|
5
|
+
import { randint } from "../../../../math/utils/random/randint.js";
|
|
6
|
+
import { add } from "../../../../tree/nodes/operators/addNode.js";
|
|
7
|
+
import { frac } from "../../../../tree/nodes/operators/fractionNode.js";
|
|
8
|
+
import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
|
|
9
|
+
import { substract } from "../../../../tree/nodes/operators/substractNode.js";
|
|
10
|
+
import { monom } from "../../../../tree/nodes/polynomials/monomNode.js";
|
|
11
|
+
import { parseAlgebraic } from "../../../../tree/parsers/latexParser.js";
|
|
12
|
+
import { coinFlip } from "../../../../utils/alea/coinFlip.js";
|
|
13
|
+
import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
|
|
14
|
+
//ax+by+c = 0 into y = ... (et inversement)
|
|
15
|
+
const getCartesianEquation = (identifiers) => {
|
|
16
|
+
const { a, b, c, toReduced } = identifiers;
|
|
17
|
+
return add(add(monom(a, 1), monom(b, 1, { variable: "y" })), c).simplify({
|
|
18
|
+
forbidFactorize: true,
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
const getReducedEquation = (identifiers) => {
|
|
22
|
+
const { a, b, c, toReduced } = identifiers;
|
|
23
|
+
return frac(substract(-c, multiply(a, "x")), b).simplify({
|
|
24
|
+
towardsDistribute: true,
|
|
25
|
+
forceDistributeFractions: true,
|
|
26
|
+
forbidFactorize: true,
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
const getPropositions = (n, { answer, ...identifiers }) => {
|
|
30
|
+
const { a, b, c, toReduced } = identifiers;
|
|
31
|
+
const propositions = [];
|
|
32
|
+
addValidProp(propositions, answer);
|
|
33
|
+
while (propositions.length < n) {
|
|
34
|
+
if (toReduced) {
|
|
35
|
+
const bRand = randint(-9, 10);
|
|
36
|
+
const aRand = coinFlip()
|
|
37
|
+
? RationalConstructor.randomIrreductible().toTree()
|
|
38
|
+
: randint(-9, 10);
|
|
39
|
+
tryToAddWrongProp(propositions, `y=${add(monom(aRand, 1), bRand).toTex()}`);
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
const bRand = randint(-9, 10);
|
|
43
|
+
const aRand = randint(-9, 10);
|
|
44
|
+
const cRand = randint(-9, 10);
|
|
45
|
+
tryToAddWrongProp(propositions, `${add(monom(aRand, 1), add(monom(bRand, 1, { variable: "y" }), cRand)).toTex()}=0`);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return shuffleProps(propositions, n);
|
|
49
|
+
};
|
|
50
|
+
const getAnswer = (identifiers) => {
|
|
51
|
+
const { a, b, c, toReduced } = identifiers;
|
|
52
|
+
const equation = toReduced
|
|
53
|
+
? `y=${getReducedEquation(identifiers).toTex()}`
|
|
54
|
+
: `${getCartesianEquation(identifiers).toTex()}=0`;
|
|
55
|
+
return equation;
|
|
56
|
+
};
|
|
57
|
+
const getInstruction = (identifiers) => {
|
|
58
|
+
const { a, b, c, toReduced } = identifiers;
|
|
59
|
+
const equation = toReduced
|
|
60
|
+
? `${getCartesianEquation(identifiers).toTex()}=0`
|
|
61
|
+
: `y=${getReducedEquation(identifiers).toTex()}`;
|
|
62
|
+
return `Soit $d$ une droite d'équation ${toReduced ? "cartésienne" : "réduite"} :
|
|
63
|
+
|
|
64
|
+
$$
|
|
65
|
+
${equation}
|
|
66
|
+
$$
|
|
67
|
+
|
|
68
|
+
${toReduced
|
|
69
|
+
? `Quelle est l'équation réduite de $d$ ?`
|
|
70
|
+
: `Donner une équation cartésienne de $d$.`}`;
|
|
71
|
+
};
|
|
72
|
+
// const getHint: GetHint<Identifiers> = (identifiers) => {
|
|
73
|
+
// return "";
|
|
74
|
+
// };
|
|
75
|
+
// const getCorrection: GetCorrection<Identifiers> = (identifiers) => {
|
|
76
|
+
// return "";
|
|
77
|
+
// };
|
|
78
|
+
const getKeys = (identifiers) => {
|
|
79
|
+
return ["x", "y", "equal"];
|
|
80
|
+
};
|
|
81
|
+
const isAnswerValid = (ans, { answer, ...identifiers }) => {
|
|
82
|
+
try {
|
|
83
|
+
const { a, b, c, toReduced } = identifiers;
|
|
84
|
+
if (toReduced) {
|
|
85
|
+
const splitted = ans.split("=");
|
|
86
|
+
if (splitted[0] !== "y" || splitted.length !== 2)
|
|
87
|
+
return false;
|
|
88
|
+
const parsed = parseAlgebraic(splitted[1]);
|
|
89
|
+
return ("y=" +
|
|
90
|
+
parsed
|
|
91
|
+
.simplify({
|
|
92
|
+
towardsDistribute: true,
|
|
93
|
+
forceDistributeFractions: true,
|
|
94
|
+
forbidFactorize: true,
|
|
95
|
+
})
|
|
96
|
+
.toTex() ===
|
|
97
|
+
answer);
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
const splitted = ans.split("=");
|
|
101
|
+
if (splitted[1] !== "0" || splitted.length !== 2)
|
|
102
|
+
return false;
|
|
103
|
+
const parsed = parseAlgebraic(splitted[0]);
|
|
104
|
+
if (b === 0) {
|
|
105
|
+
const x = frac(-c, a).simplify();
|
|
106
|
+
return (parsed
|
|
107
|
+
.toDetailedEvaluation({ x: x, y: (0).toTree() })
|
|
108
|
+
.simplify()
|
|
109
|
+
.toTex() === "0" &&
|
|
110
|
+
parsed
|
|
111
|
+
.toDetailedEvaluation({ x: x, y: (1).toTree() })
|
|
112
|
+
.simplify()
|
|
113
|
+
.toTex() === "0");
|
|
114
|
+
}
|
|
115
|
+
const validpoints = [
|
|
116
|
+
[(0).toTree(), frac(-c, b).simplify()],
|
|
117
|
+
[(1).toTree(), frac(-c - a, b).simplify()],
|
|
118
|
+
];
|
|
119
|
+
return (parsed
|
|
120
|
+
.toDetailedEvaluation({ x: validpoints[0][0], y: validpoints[0][1] })
|
|
121
|
+
.simplify()
|
|
122
|
+
.toTex() === "0" &&
|
|
123
|
+
parsed
|
|
124
|
+
.toDetailedEvaluation({ x: validpoints[1][0], y: validpoints[1][1] })
|
|
125
|
+
.simplify()
|
|
126
|
+
.toTex() === "0");
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
catch (err) {
|
|
130
|
+
return handleVEAError(err);
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
const getCartesianEquationToReducedQuestion = (ops) => {
|
|
134
|
+
let a;
|
|
135
|
+
let b;
|
|
136
|
+
let c;
|
|
137
|
+
do {
|
|
138
|
+
a = randint(-9, 10);
|
|
139
|
+
b = randint(-9, 10, [0]);
|
|
140
|
+
c = randint(-9, 10, (a === 1 && b === 0) || (a === 0 && b === 1) ? [0] : undefined);
|
|
141
|
+
} while (gcd(a, b, c) !== 1 || (a <= 0 && b <= 0 && c <= 0));
|
|
142
|
+
const identifiers = { a, b, c, toReduced: coinFlip() };
|
|
143
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
144
|
+
};
|
|
145
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
146
|
+
return {
|
|
147
|
+
answer: getAnswer(identifiers),
|
|
148
|
+
instruction: getInstruction(identifiers),
|
|
149
|
+
keys: getKeys(identifiers),
|
|
150
|
+
answerFormat: "tex",
|
|
151
|
+
identifiers,
|
|
152
|
+
// hint: getHint(identifiers),
|
|
153
|
+
// correction: getCorrection(identifiers),
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
export const cartesianEquationToReduced = {
|
|
157
|
+
id: "cartesianEquationToReduced",
|
|
158
|
+
label: "Passer d'équation réduite d'une droite à équation cartésienne, et inversement",
|
|
159
|
+
isSingleStep: true,
|
|
160
|
+
generator: (nb, opts) => getDistinctQuestions(() => getCartesianEquationToReducedQuestion(opts), nb),
|
|
161
|
+
qcmTimer: 60,
|
|
162
|
+
freeTimer: 60,
|
|
163
|
+
getPropositions,
|
|
164
|
+
isAnswerValid,
|
|
165
|
+
subject: "Mathématiques",
|
|
166
|
+
getInstruction,
|
|
167
|
+
// getHint,
|
|
168
|
+
// getCorrection,
|
|
169
|
+
getAnswer,
|
|
170
|
+
getQuestionFromIdentifiers,
|
|
171
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise.js";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
a: number;
|
|
4
|
+
b: number;
|
|
5
|
+
c: number;
|
|
6
|
+
};
|
|
7
|
+
export declare const findPointOnLineWithCartesianEquation: Exercise<Identifiers>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=findPointOnLineWithCartesianEquation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"findPointOnLineWithCartesianEquation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/lines/findPointOnLineWithCartesianEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAarC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA4IF,eAAO,MAAM,oCAAoC,EAAE,QAAQ,CAAC,WAAW,CAqBtE,CAAC"}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { Point, PointConstructor } from "../../../../math/geometry/point.js";
|
|
4
|
+
import { randint } from "../../../../math/utils/random/randint.js";
|
|
5
|
+
import { add } from "../../../../tree/nodes/operators/addNode.js";
|
|
6
|
+
import { frac } from "../../../../tree/nodes/operators/fractionNode.js";
|
|
7
|
+
import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
|
|
8
|
+
import { monom } from "../../../../tree/nodes/polynomials/monomNode.js";
|
|
9
|
+
import { pointParser } from "../../../../tree/parsers/pointParser.js";
|
|
10
|
+
import { doWhile } from "../../../../utils/doWhile.js";
|
|
11
|
+
import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
|
|
12
|
+
import { alignTex } from "../../../../utils/latex/alignTex.js";
|
|
13
|
+
//ax+by+c = 0
|
|
14
|
+
const getPropositions = (n, { answer, a, b, c }) => {
|
|
15
|
+
const propositions = [];
|
|
16
|
+
addValidProp(propositions, answer);
|
|
17
|
+
const node = add(add(monom(a, 1), monom(b, 1, { variable: "y" })), c);
|
|
18
|
+
while (propositions.length < n) {
|
|
19
|
+
const point = doWhile(() => PointConstructor.random("A"), (p) => node.toDetailedEvaluation({ x: p.x, y: p.y }).simplify().toTex() ===
|
|
20
|
+
"0");
|
|
21
|
+
tryToAddWrongProp(propositions, point.toCoords());
|
|
22
|
+
}
|
|
23
|
+
return shuffleProps(propositions, n);
|
|
24
|
+
};
|
|
25
|
+
const getAnswer = (identifiers) => {
|
|
26
|
+
const { a, b, c } = identifiers;
|
|
27
|
+
if (b === 0)
|
|
28
|
+
return new Point("A", frac(-c, a).simplify(), 0).toCoords();
|
|
29
|
+
return new Point("A", 0, frac(-c, b).simplify()).toCoords();
|
|
30
|
+
};
|
|
31
|
+
const getInstruction = (identifiers) => {
|
|
32
|
+
const { a, b, c } = identifiers;
|
|
33
|
+
return `Soit $d$ la droite d'équation cartésienne :
|
|
34
|
+
|
|
35
|
+
$$
|
|
36
|
+
${add(add(monom(a, 1), monom(b, 1, { variable: "y" })), c).toTex()} = 0
|
|
37
|
+
$$
|
|
38
|
+
|
|
39
|
+
Donner les coordonnées d'un point appartenant à $d$.`;
|
|
40
|
+
};
|
|
41
|
+
const getHint = (identifiers) => {
|
|
42
|
+
const { a, b, c } = identifiers;
|
|
43
|
+
if (b === 0)
|
|
44
|
+
return `On peut isoler $x$ dans l'équation cartésienne de la droite, puis remarquer que $d$ est une droite verticale.`;
|
|
45
|
+
if (a === 0)
|
|
46
|
+
return `On peut isoler $y$ dans l'équation cartésienne de la droite, puis remarquer que $d$ est une droite horizontale.`;
|
|
47
|
+
return `On peut remplacer $x$ par une valeur quelconque $x_A$ dans l'équation de la droite, puis en déduire une valeur $y_A$ pour $y$. Le point de coordonnées $(x_A;y_A)$ est alors un point appartenant à $d$.`;
|
|
48
|
+
};
|
|
49
|
+
const getCorrection = (identifiers) => {
|
|
50
|
+
const { a, b, c } = identifiers;
|
|
51
|
+
const node = add(add(monom(a, 1), monom(b, 1, { variable: "y" })), c);
|
|
52
|
+
if (b === 0) {
|
|
53
|
+
const x = frac(-c, a).simplify();
|
|
54
|
+
return `On isole $x$ dans l'équation cartésienne de la droite :
|
|
55
|
+
|
|
56
|
+
${alignTex([
|
|
57
|
+
[node.toTex(), "=", "0"],
|
|
58
|
+
["x", "=", x.toTex()],
|
|
59
|
+
])}
|
|
60
|
+
|
|
61
|
+
On en déduit que tout point d'abscisse $${x.toTex()}$ appartient à $d$ (c'est à dire que $d$ est une droite verticale). Par exemple, le point $(${x.toTex()};0)$ appartient à $d$.`;
|
|
62
|
+
}
|
|
63
|
+
if (a === 0) {
|
|
64
|
+
const y = frac(-c, b).simplify();
|
|
65
|
+
return `On isole $y$ dans l'équation cartésienne de la droite :
|
|
66
|
+
|
|
67
|
+
${alignTex([
|
|
68
|
+
[node.toTex(), "=", "0"],
|
|
69
|
+
["y", "=", y.toTex()],
|
|
70
|
+
])}
|
|
71
|
+
|
|
72
|
+
On en déduit que tout point d'ordonnée $${y.toTex()}$ appartient à $d$ (c'est à dire que $d$ est une droite horizontale). Par exemple, le point $(0;${y.toTex()})$ appartient à $d$.`;
|
|
73
|
+
}
|
|
74
|
+
const detailed = node.toDetailedEvaluation({ x: (0).toTree() });
|
|
75
|
+
const simp = detailed.simplify();
|
|
76
|
+
const y = frac(-c, b).simplify();
|
|
77
|
+
return `On peut, par example, remplacer $x$ par $0$ dans l'équation de la droite :
|
|
78
|
+
|
|
79
|
+
$$
|
|
80
|
+
${detailed.toTex()} = ${simp.toTex()}
|
|
81
|
+
$$
|
|
82
|
+
|
|
83
|
+
On résout alors l'équation $${simp.toTex()} = 0$ :
|
|
84
|
+
|
|
85
|
+
${alignTex([
|
|
86
|
+
[simp.toTex(), "=", "0"],
|
|
87
|
+
["y", "=", y.toTex()],
|
|
88
|
+
])}
|
|
89
|
+
$$
|
|
90
|
+
${detailed.toTex()} = ${simp.toTex()}
|
|
91
|
+
$$
|
|
92
|
+
|
|
93
|
+
On en déduit que le point de coordonnées $(0;${y.toTex()})$ appartient à $d$.
|
|
94
|
+
`;
|
|
95
|
+
};
|
|
96
|
+
const getKeys = (identifiers) => {
|
|
97
|
+
return ["semicolon"];
|
|
98
|
+
};
|
|
99
|
+
const isAnswerValid = (ans, { answer, ...identifiers }) => {
|
|
100
|
+
try {
|
|
101
|
+
const { a, b, c } = identifiers;
|
|
102
|
+
const parsed = pointParser(ans);
|
|
103
|
+
if (!parsed)
|
|
104
|
+
return false;
|
|
105
|
+
const node = add(add(multiply(a, parsed.x), multiply(b, parsed.y)), c);
|
|
106
|
+
return node.simplify().toTex() === "0";
|
|
107
|
+
}
|
|
108
|
+
catch (err) {
|
|
109
|
+
return handleVEAError(err);
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
const getFindPointOnLineWithCartesianEquationQuestion = (ops) => {
|
|
113
|
+
const a = randint(-9, 10);
|
|
114
|
+
const b = randint(-9, 10, a === 0 ? [0] : undefined);
|
|
115
|
+
const c = randint(-9, 10, (a === 1 && b === 0) || (a === 0 && b === 1) ? [0] : undefined);
|
|
116
|
+
const identifiers = { a, b, c };
|
|
117
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
118
|
+
};
|
|
119
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
120
|
+
return {
|
|
121
|
+
answer: getAnswer(identifiers),
|
|
122
|
+
instruction: getInstruction(identifiers),
|
|
123
|
+
keys: getKeys(identifiers),
|
|
124
|
+
answerFormat: "tex",
|
|
125
|
+
identifiers,
|
|
126
|
+
hint: getHint(identifiers),
|
|
127
|
+
correction: getCorrection(identifiers),
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
export const findPointOnLineWithCartesianEquation = {
|
|
131
|
+
id: "findPointOnLineWithCartesianEquation",
|
|
132
|
+
label: "Déterminer les coordonnées d'un point dans l'équation cartésienne d'une droite",
|
|
133
|
+
isSingleStep: true,
|
|
134
|
+
generator: (nb, opts) => getDistinctQuestions(() => getFindPointOnLineWithCartesianEquationQuestion(opts), nb),
|
|
135
|
+
qcmTimer: 60,
|
|
136
|
+
freeTimer: 60,
|
|
137
|
+
getPropositions,
|
|
138
|
+
isAnswerValid,
|
|
139
|
+
subject: "Mathématiques",
|
|
140
|
+
getInstruction,
|
|
141
|
+
getHint,
|
|
142
|
+
getCorrection,
|
|
143
|
+
getAnswer,
|
|
144
|
+
getQuestionFromIdentifiers,
|
|
145
|
+
hasHintAndCorrection: true,
|
|
146
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise.js";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
a: number;
|
|
4
|
+
b: number;
|
|
5
|
+
};
|
|
6
|
+
export declare const findPointOnLineWithReductEquation: Exercise<Identifiers>;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=findPointOnLineWithReductEquation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"findPointOnLineWithReductEquation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/lines/findPointOnLineWithReductEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAyFF,eAAO,MAAM,iCAAiC,EAAE,QAAQ,CAAC,WAAW,CAqBnE,CAAC"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { Point, PointConstructor } from "../../../../math/geometry/point.js";
|
|
4
|
+
import { randint } from "../../../../math/utils/random/randint.js";
|
|
5
|
+
import { add } from "../../../../tree/nodes/operators/addNode.js";
|
|
6
|
+
import { monom } from "../../../../tree/nodes/polynomials/monomNode.js";
|
|
7
|
+
import { pointParser } from "../../../../tree/parsers/pointParser.js";
|
|
8
|
+
import { doWhile } from "../../../../utils/doWhile.js";
|
|
9
|
+
import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
|
|
10
|
+
//y = ax+b
|
|
11
|
+
const getPropositions = (n, { answer, a, b }) => {
|
|
12
|
+
const propositions = [];
|
|
13
|
+
addValidProp(propositions, answer);
|
|
14
|
+
const node = add(monom(a, 1), b);
|
|
15
|
+
while (propositions.length < n) {
|
|
16
|
+
const point = doWhile(() => PointConstructor.random("A"), (p) => node.toDetailedEvaluation({ x: p.x }).simplify().toTex() ===
|
|
17
|
+
p.y.toTex());
|
|
18
|
+
tryToAddWrongProp(propositions, point.toCoords());
|
|
19
|
+
}
|
|
20
|
+
return shuffleProps(propositions, n);
|
|
21
|
+
};
|
|
22
|
+
const getAnswer = (identifiers) => {
|
|
23
|
+
const { a, b } = identifiers;
|
|
24
|
+
const point = new Point("A", 1, a + b);
|
|
25
|
+
return point.toCoords();
|
|
26
|
+
};
|
|
27
|
+
const getInstruction = (identifiers) => {
|
|
28
|
+
const { a, b } = identifiers;
|
|
29
|
+
return `Soit $d$ la droite d'équation :
|
|
30
|
+
|
|
31
|
+
$$
|
|
32
|
+
y = ${add(monom(a, 1), b).toTex()}
|
|
33
|
+
$$
|
|
34
|
+
|
|
35
|
+
Donner les coordonnées d'un point appartenant à $d$.`;
|
|
36
|
+
};
|
|
37
|
+
const getHint = (identifiers) => {
|
|
38
|
+
return "On peut remplacer $x$ dans l'équation de $d$ par une valeur quelconque $x_A$. Cela nous donne une valeur $y_A$ pour $y$. Le point $(x_A;y_A)$ est alors un point appartenant à $d$.";
|
|
39
|
+
};
|
|
40
|
+
const getCorrection = (identifiers) => {
|
|
41
|
+
const node = add(monom(identifiers.a, 1), identifiers.b);
|
|
42
|
+
const detailed = node.toDetailedEvaluation({ x: (1).toTree() });
|
|
43
|
+
const y = detailed.simplify();
|
|
44
|
+
return `On peut, par exemple, remplacer $x$ par $1$ dans l'équation de $d$ :
|
|
45
|
+
|
|
46
|
+
$$
|
|
47
|
+
${detailed.toTex()} = ${y.toTex()}
|
|
48
|
+
$$
|
|
49
|
+
|
|
50
|
+
On en déduit que le point de coordonnées $\\left(1;${y.toTex()}\\right)$ appartient à $d$. `;
|
|
51
|
+
};
|
|
52
|
+
const getKeys = (identifiers) => {
|
|
53
|
+
return ["semicolon"];
|
|
54
|
+
};
|
|
55
|
+
const isAnswerValid = (ans, { answer, a, b }) => {
|
|
56
|
+
try {
|
|
57
|
+
const parsed = pointParser(ans);
|
|
58
|
+
if (!parsed)
|
|
59
|
+
return false;
|
|
60
|
+
return parsed.y.evaluate() === a * parsed.x.evaluate() + b;
|
|
61
|
+
}
|
|
62
|
+
catch (err) {
|
|
63
|
+
return handleVEAError(err);
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
const getFindPointOnLineWithReductEquationQuestion = (ops) => {
|
|
67
|
+
const a = randint(-10, 10, [0]);
|
|
68
|
+
const b = randint(-10, 10, a === 1 ? [0] : undefined);
|
|
69
|
+
const identifiers = { a, b };
|
|
70
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
71
|
+
};
|
|
72
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
73
|
+
return {
|
|
74
|
+
answer: getAnswer(identifiers),
|
|
75
|
+
instruction: getInstruction(identifiers),
|
|
76
|
+
keys: getKeys(identifiers),
|
|
77
|
+
answerFormat: "tex",
|
|
78
|
+
identifiers,
|
|
79
|
+
hint: getHint(identifiers),
|
|
80
|
+
correction: getCorrection(identifiers),
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
export const findPointOnLineWithReductEquation = {
|
|
84
|
+
id: "findPointOnLineWithReductEquation",
|
|
85
|
+
label: "Déterminer les coordonnées d'un point dans l'équation reduite d'une droite",
|
|
86
|
+
isSingleStep: true,
|
|
87
|
+
generator: (nb, opts) => getDistinctQuestions(() => getFindPointOnLineWithReductEquationQuestion(opts), nb),
|
|
88
|
+
qcmTimer: 60,
|
|
89
|
+
freeTimer: 60,
|
|
90
|
+
getPropositions,
|
|
91
|
+
isAnswerValid,
|
|
92
|
+
subject: "Mathématiques",
|
|
93
|
+
getInstruction,
|
|
94
|
+
getHint,
|
|
95
|
+
getCorrection,
|
|
96
|
+
getAnswer,
|
|
97
|
+
getQuestionFromIdentifiers,
|
|
98
|
+
hasHintAndCorrection: true,
|
|
99
|
+
};
|
|
@@ -1,2 +1,7 @@
|
|
|
1
1
|
export * from "./linesRelativePositions.js";
|
|
2
|
+
export * from "./findPointOnLineWithReductEquation.js";
|
|
3
|
+
export * from "./cartesianEquationToReduced.js";
|
|
4
|
+
export * from "./findPointOnLineWithCartesianEquation.js";
|
|
5
|
+
export * from "./isPointOnLine.js";
|
|
6
|
+
export * from "./isPointOnCartesianLine.js";
|
|
2
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/lines/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/lines/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wCAAwC,CAAC;AACvD,cAAc,iCAAiC,CAAC;AAChD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC"}
|
|
@@ -1 +1,6 @@
|
|
|
1
1
|
export * from "./linesRelativePositions.js";
|
|
2
|
+
export * from "./findPointOnLineWithReductEquation.js";
|
|
3
|
+
export * from "./cartesianEquationToReduced.js";
|
|
4
|
+
export * from "./findPointOnLineWithCartesianEquation.js";
|
|
5
|
+
export * from "./isPointOnLine.js";
|
|
6
|
+
export * from "./isPointOnCartesianLine.js";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise.js";
|
|
2
|
+
import { NodeIdentifiers } from "../../../../tree/nodes/nodeConstructor.js";
|
|
3
|
+
type Identifiers = {
|
|
4
|
+
a: number;
|
|
5
|
+
b: number;
|
|
6
|
+
c: number;
|
|
7
|
+
x: NodeIdentifiers;
|
|
8
|
+
y: NodeIdentifiers;
|
|
9
|
+
isOnLine: boolean;
|
|
10
|
+
};
|
|
11
|
+
export declare const isPointOnCartesianLine: Exercise<Identifiers>;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=isPointOnCartesianLine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isPointOnCartesianLine.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/lines/isPointOnCartesianLine.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAMrC,OAAO,EACL,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAU7C,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,eAAe,CAAC;IACnB,CAAC,EAAE,eAAe,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AAiHF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAiBxD,CAAC"}
|