math-exercises 2.2.32 → 2.2.34

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.
Files changed (65) hide show
  1. package/lib/exercises/math/calcul/arithmetics/primeNumbers.d.ts.map +1 -1
  2. package/lib/exercises/math/calcul/proportionality/proportionalityTable.d.ts.map +1 -1
  3. package/lib/exercises/math/calcul/proportionality/proportionalityTable.js +18 -8
  4. package/lib/exercises/math/calcul/proportionality/proportionalityTableCoefficient.d.ts.map +1 -1
  5. package/lib/exercises/math/calcul/proportionality/proportionalityTableCoefficient.js +18 -10
  6. package/lib/exercises/math/functions/affines/affineAdjustment.d.ts +2 -0
  7. package/lib/exercises/math/functions/affines/affineAdjustment.d.ts.map +1 -1
  8. package/lib/exercises/math/functions/affines/affineAdjustment.js +16 -8
  9. package/lib/exercises/math/functions/affines/affineAdjustmentComplete.d.ts +2 -0
  10. package/lib/exercises/math/functions/affines/affineAdjustmentComplete.d.ts.map +1 -1
  11. package/lib/exercises/math/functions/affines/affineAdjustmentComplete.js +7 -6
  12. package/lib/exercises/math/functions/affines/affineAdjustmentRsquared.d.ts +2 -0
  13. package/lib/exercises/math/functions/affines/affineAdjustmentRsquared.d.ts.map +1 -1
  14. package/lib/exercises/math/functions/affines/affineAdjustmentRsquared.js +7 -6
  15. package/lib/exercises/math/functions/basics/inverseImageFunctionTable.d.ts.map +1 -1
  16. package/lib/exercises/math/functions/basics/inverseImageFunctionTable.js +19 -7
  17. package/lib/exercises/math/geometry/cartesian/cartesianEquationOfLine.d.ts.map +1 -1
  18. package/lib/exercises/math/geometry/cartesian/cartesianEquationOfLine.js +3 -1
  19. package/lib/exercises/math/geometry/cartesian/readAbscissOnLine.d.ts.map +1 -1
  20. package/lib/exercises/math/geometry/cartesian/readAbscissOnLine.js +2 -6
  21. package/lib/exercises/math/geometry/cartesian/readAbscissOnSemiLine.d.ts.map +1 -1
  22. package/lib/exercises/math/geometry/cartesian/readAbscissOnSemiLine.js +2 -6
  23. package/lib/exercises/math/percent/globalPercent.d.ts.map +1 -1
  24. package/lib/exercises/math/percent/globalPercent.js +3 -4
  25. package/lib/exercises/math/percent/isTableProportional.d.ts +4 -1
  26. package/lib/exercises/math/percent/isTableProportional.d.ts.map +1 -1
  27. package/lib/exercises/math/percent/isTableProportional.js +13 -9
  28. package/lib/exercises/math/percent/populationEffectifFromSubPopulation.d.ts.map +1 -1
  29. package/lib/exercises/math/percent/populationEffectifFromSubPopulation.js +9 -3
  30. package/lib/exercises/math/percent/reciprocalPercentage.d.ts.map +1 -1
  31. package/lib/exercises/math/percent/reciprocalPercentage.js +3 -4
  32. package/lib/exercises/math/probaStat/probaFromTableNoContext.d.ts.map +1 -1
  33. package/lib/exercises/math/probaStat/probaFromTableNoContext.js +35 -18
  34. package/lib/exercises/math/probaStat/probaFromTableWithContext.d.ts.map +1 -1
  35. package/lib/exercises/math/probaStat/probaFromTableWithContext.js +26 -18
  36. package/lib/exercises/math/probaStat/stats1var/averageWithTable.d.ts.map +1 -1
  37. package/lib/exercises/math/probaStat/stats1var/averageWithTable.js +17 -9
  38. package/lib/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.d.ts.map +1 -1
  39. package/lib/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.js +81 -38
  40. package/lib/exercises/math/probaStat/stats1var/median.d.ts +1 -0
  41. package/lib/exercises/math/probaStat/stats1var/median.d.ts.map +1 -1
  42. package/lib/exercises/math/probaStat/stats1var/median.js +16 -8
  43. package/lib/exercises/math/probaStat/stats1var/quartiles.d.ts.map +1 -1
  44. package/lib/exercises/math/probaStat/stats1var/quartiles.js +16 -24
  45. package/lib/exercises/math/probaStat/stats2var/averagePoint.d.ts.map +1 -1
  46. package/lib/exercises/math/probaStat/stats2var/averagePoint.js +18 -10
  47. package/lib/exercises/math/trigonometry/equationCosOnRandomInterval.d.ts +8 -0
  48. package/lib/exercises/math/trigonometry/equationCosOnRandomInterval.d.ts.map +1 -0
  49. package/lib/exercises/math/trigonometry/equationCosOnRandomInterval.js +104 -0
  50. package/lib/exercises/math/trigonometry/equationSinOnRandomInterval.d.ts +8 -0
  51. package/lib/exercises/math/trigonometry/equationSinOnRandomInterval.d.ts.map +1 -0
  52. package/lib/exercises/math/trigonometry/equationSinOnRandomInterval.js +104 -0
  53. package/lib/exercises/math/trigonometry/index.js +1 -0
  54. package/lib/index.d.ts +11 -1
  55. package/lib/index.d.ts.map +1 -1
  56. package/lib/math/trigonometry/remarkableValues.d.ts +10 -0
  57. package/lib/math/trigonometry/remarkableValues.d.ts.map +1 -1
  58. package/lib/math/trigonometry/remarkableValues.js +12 -1
  59. package/lib/utils/latex/dollarize.d.ts +2 -0
  60. package/lib/utils/latex/dollarize.d.ts.map +1 -0
  61. package/lib/utils/latex/dollarize.js +7 -0
  62. package/lib/utils/markdown/mdTable.d.ts +2 -0
  63. package/lib/utils/markdown/mdTable.d.ts.map +1 -0
  64. package/lib/utils/markdown/mdTable.js +17 -0
  65. package/package.json +1 -1
@@ -0,0 +1,104 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.equationCosOnRandomInterval = void 0;
4
+ const exercise_1 = require("../../../exercises/exercise");
5
+ const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
6
+ const remarkableValues_1 = require("../../../math/trigonometry/remarkableValues");
7
+ const randint_1 = require("../../../math/utils/random/randint");
8
+ const equationSolutionNode_1 = require("../../../tree/nodes/equations/equationSolutionNode");
9
+ const cosNode_1 = require("../../../tree/nodes/functions/cosNode");
10
+ const piNode_1 = require("../../../tree/nodes/numbers/piNode");
11
+ const addNode_1 = require("../../../tree/nodes/operators/addNode");
12
+ const multiplyNode_1 = require("../../../tree/nodes/operators/multiplyNode");
13
+ const closure_1 = require("../../../tree/nodes/sets/closure");
14
+ const discreteSetNode_1 = require("../../../tree/nodes/sets/discreteSetNode");
15
+ const intervalNode_1 = require("../../../tree/nodes/sets/intervalNode");
16
+ const random_1 = require("../../../utils/alea/random");
17
+ const getPropositions = (n, { answer }) => {
18
+ const propositions = [];
19
+ (0, exercise_1.addValidProp)(propositions, answer);
20
+ while (propositions.length < n) {
21
+ throw Error("QCM not implemented");
22
+ }
23
+ return (0, exercise_1.shuffleProps)(propositions, n);
24
+ };
25
+ const getAnswerNode = (identifiers) => {
26
+ const coeff = identifiers.leftBoundPiMultiple;
27
+ /**
28
+ * Si l'intervalle est centré autour d'un multiple de 2pi (coeff impair) (genre ]3pi, 5pi]) on ajoute (coeff+1)/2 tours
29
+ * Sinon (coeff pair) (genre ]2pi, 4pipi]) , on chope la value de ]0, 2pi] et on ajoute coeff/2 tours
30
+ */
31
+ const turnsToAdd = Math.abs(coeff % 2) === 1 ? (coeff + 1) / 2 : coeff / 2;
32
+ const cos = remarkableValues_1.mainTrigoValues
33
+ .find((v) => v.degree === identifiers.degree)
34
+ .cos.evaluate({});
35
+ const values = (Math.abs(coeff % 2) === 1 ? remarkableValues_1.mainTrigoValues : remarkableValues_1.trigoValuesOnZeroTwoPIOF).filter((v) => v.cos.evaluate({}) === cos);
36
+ if (values.length === 1) {
37
+ const value = values[0];
38
+ const newValue = new addNode_1.AddNode(value.angle, new multiplyNode_1.MultiplyNode((turnsToAdd * 2).toTree(), piNode_1.PiNode)).simplify();
39
+ return new equationSolutionNode_1.EquationSolutionNode(new discreteSetNode_1.DiscreteSetNode([newValue]));
40
+ }
41
+ else {
42
+ const newValues = values.map((v) => {
43
+ return new addNode_1.AddNode(v.angle, new multiplyNode_1.MultiplyNode((turnsToAdd * 2).toTree(), piNode_1.PiNode)).simplify();
44
+ });
45
+ return new equationSolutionNode_1.EquationSolutionNode(new discreteSetNode_1.DiscreteSetNode(newValues.sort((a, b) => a.evaluate({}) - b.evaluate({}))));
46
+ }
47
+ };
48
+ const getAnswer = (identifiers) => {
49
+ return getAnswerNode(identifiers).toTex();
50
+ };
51
+ const getInstruction = ({ degree, leftBoundPiMultiple, }) => {
52
+ const value = remarkableValues_1.mainPositiveTrigovalues.find((v) => v.degree === degree);
53
+ const leftBound = new multiplyNode_1.MultiplyNode(leftBoundPiMultiple.toTree(), piNode_1.PiNode).simplify();
54
+ const rightBound = new multiplyNode_1.MultiplyNode((leftBoundPiMultiple + 2).toTree(), piNode_1.PiNode).simplify();
55
+ const interval = new intervalNode_1.IntervalNode(leftBound, rightBound, closure_1.ClosureType.OF);
56
+ return `Résoudre sur $${interval.toTex()}$ l'équation :
57
+
58
+ $$
59
+ ${new cosNode_1.CosNode("x".toTree()).toTex()}=${value.cos.toTex()}
60
+ $$`;
61
+ };
62
+ const getHint = (identifiers) => {
63
+ return "";
64
+ };
65
+ const getCorrection = (identifiers) => {
66
+ return "";
67
+ };
68
+ const getKeys = (identifiers) => {
69
+ return ["pi"];
70
+ };
71
+ const isAnswerValid = (ans, { answer }) => {
72
+ throw Error("VEA not implemented");
73
+ };
74
+ const getEquationCosOnRandomIntervalQuestion = () => {
75
+ const value = (0, random_1.random)(remarkableValues_1.mainPositiveTrigovalues);
76
+ const degree = value.degree;
77
+ const leftBoundPiMultiple = (0, randint_1.randint)(-3, 4);
78
+ const identifiers = { degree, leftBoundPiMultiple };
79
+ const question = {
80
+ answer: getAnswer(identifiers),
81
+ instruction: getInstruction(identifiers),
82
+ keys: getKeys(identifiers),
83
+ answerFormat: "tex",
84
+ identifiers,
85
+ hint: getHint(identifiers),
86
+ correction: getCorrection(identifiers),
87
+ };
88
+ return question;
89
+ };
90
+ exports.equationCosOnRandomInterval = {
91
+ id: "equationCosOnRandomInterval",
92
+ connector: "\\iff",
93
+ label: "Résoudre une équation du type $\\cos\\left(x\\right)=k$ sur un intervalle donné",
94
+ isSingleStep: true,
95
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getEquationCosOnRandomIntervalQuestion, nb),
96
+ qcmTimer: 60,
97
+ freeTimer: 60,
98
+ getPropositions,
99
+ isAnswerValid,
100
+ subject: "Mathématiques",
101
+ getHint,
102
+ getCorrection,
103
+ getAnswer,
104
+ };
@@ -0,0 +1,8 @@
1
+ import { Exercise } from "../../../exercises/exercise";
2
+ type Identifiers = {
3
+ degree: number;
4
+ leftBoundPiMultiple: number;
5
+ };
6
+ export declare const equationSinOnRandomInterval: Exercise<Identifiers>;
7
+ export {};
8
+ //# sourceMappingURL=equationSinOnRandomInterval.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"equationSinOnRandomInterval.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/trigonometry/equationSinOnRandomInterval.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,0BAA0B,CAAC;AAqBlC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,mBAAmB,EAAE,MAAM,CAAC;CAC7B,CAAC;AA6GF,eAAO,MAAM,2BAA2B,EAAE,QAAQ,CAAC,WAAW,CAgB7D,CAAC"}
@@ -0,0 +1,104 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.equationSinOnRandomInterval = void 0;
4
+ const exercise_1 = require("../../../exercises/exercise");
5
+ const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
6
+ const remarkableValues_1 = require("../../../math/trigonometry/remarkableValues");
7
+ const randint_1 = require("../../../math/utils/random/randint");
8
+ const equationSolutionNode_1 = require("../../../tree/nodes/equations/equationSolutionNode");
9
+ const sinNode_1 = require("../../../tree/nodes/functions/sinNode");
10
+ const piNode_1 = require("../../../tree/nodes/numbers/piNode");
11
+ const addNode_1 = require("../../../tree/nodes/operators/addNode");
12
+ const multiplyNode_1 = require("../../../tree/nodes/operators/multiplyNode");
13
+ const closure_1 = require("../../../tree/nodes/sets/closure");
14
+ const discreteSetNode_1 = require("../../../tree/nodes/sets/discreteSetNode");
15
+ const intervalNode_1 = require("../../../tree/nodes/sets/intervalNode");
16
+ const random_1 = require("../../../utils/alea/random");
17
+ const getPropositions = (n, { answer }) => {
18
+ const propositions = [];
19
+ (0, exercise_1.addValidProp)(propositions, answer);
20
+ while (propositions.length < n) {
21
+ throw Error("QCM not implemented");
22
+ }
23
+ return (0, exercise_1.shuffleProps)(propositions, n);
24
+ };
25
+ const getAnswerNode = (identifiers) => { };
26
+ const getAnswer = (identifiers) => {
27
+ const coeff = identifiers.leftBoundPiMultiple;
28
+ /**
29
+ * Si l'intervalle est centré autour d'un multiple de 2pi (coeff impair) (genre ]3pi, 5pi]) on ajoute (coeff+1)/2 tours
30
+ * Sinon (coeff pair) (genre ]2pi, 4pipi]) , on chope la value de ]0, 2pi] et on ajoute coeff/2 tours
31
+ */
32
+ const turnsToAdd = Math.abs(coeff % 2) === 1 ? (coeff + 1) / 2 : coeff / 2;
33
+ const sin = remarkableValues_1.mainTrigoValues
34
+ .find((v) => v.degree === identifiers.degree)
35
+ .sin.evaluate({});
36
+ const values = (Math.abs(coeff % 2) === 1 ? remarkableValues_1.mainTrigoValues : remarkableValues_1.trigoValuesOnZeroTwoPIOF).filter((v) => v.sin.evaluate({}) === sin);
37
+ if (values.length === 1) {
38
+ const value = values[0];
39
+ const newValue = new addNode_1.AddNode(value.angle, new multiplyNode_1.MultiplyNode((turnsToAdd * 2).toTree(), piNode_1.PiNode)).simplify();
40
+ return (new equationSolutionNode_1.EquationSolutionNode(new discreteSetNode_1.DiscreteSetNode([newValue])).toTex() +
41
+ ` turns ${turnsToAdd}, value : ${value.angle.toTex()}`);
42
+ }
43
+ else {
44
+ const newValues = values.map((v) => {
45
+ return new addNode_1.AddNode(v.angle, new multiplyNode_1.MultiplyNode((turnsToAdd * 2).toTree(), piNode_1.PiNode)).simplify();
46
+ });
47
+ return (new equationSolutionNode_1.EquationSolutionNode(new discreteSetNode_1.DiscreteSetNode(newValues.sort((a, b) => a.evaluate({}) - b.evaluate({})))).toTex() +
48
+ ` turns ${turnsToAdd}, values: ${values.map((v) => v.angle.toTex())}`);
49
+ }
50
+ };
51
+ const getInstruction = ({ degree, leftBoundPiMultiple, }) => {
52
+ const value = remarkableValues_1.mainPositiveTrigovalues.find((v) => v.degree === degree);
53
+ const leftBound = new multiplyNode_1.MultiplyNode(leftBoundPiMultiple.toTree(), piNode_1.PiNode).simplify();
54
+ const rightBound = new multiplyNode_1.MultiplyNode((leftBoundPiMultiple + 2).toTree(), piNode_1.PiNode).simplify();
55
+ const interval = new intervalNode_1.IntervalNode(leftBound, rightBound, closure_1.ClosureType.OF);
56
+ return `Résoudre sur $${interval.toTex()}$ l'équation :
57
+
58
+ $$
59
+ ${new sinNode_1.SinNode("x".toTree()).toTex()}=${value.sin.toTex()}
60
+ $$`;
61
+ };
62
+ const getHint = (identifiers) => {
63
+ return "";
64
+ };
65
+ const getCorrection = (identifiers) => {
66
+ return "";
67
+ };
68
+ const getKeys = (identifiers) => {
69
+ return ["pi"];
70
+ };
71
+ const isAnswerValid = (ans, { answer }) => {
72
+ throw Error("VEA not implemented");
73
+ };
74
+ const getEquationSinOnRandomIntervalQuestion = () => {
75
+ const value = (0, random_1.random)(remarkableValues_1.mainPositiveTrigovalues);
76
+ const degree = value.degree;
77
+ const leftBoundPiMultiple = (0, randint_1.randint)(-3, 4);
78
+ const identifiers = { degree, leftBoundPiMultiple };
79
+ const question = {
80
+ answer: getAnswer(identifiers),
81
+ instruction: getInstruction(identifiers),
82
+ keys: getKeys(identifiers),
83
+ answerFormat: "tex",
84
+ identifiers,
85
+ hint: getHint(identifiers),
86
+ correction: getCorrection(identifiers),
87
+ };
88
+ return question;
89
+ };
90
+ exports.equationSinOnRandomInterval = {
91
+ id: "equationSinOnRandomInterval",
92
+ connector: "\\iff",
93
+ label: "Résoudre une équation du type $\\Sin\\left(x\\right)=k$ sur un intervalle donné",
94
+ isSingleStep: true,
95
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getEquationSinOnRandomIntervalQuestion, nb),
96
+ qcmTimer: 60,
97
+ freeTimer: 60,
98
+ getPropositions,
99
+ isAnswerValid,
100
+ subject: "Mathématiques",
101
+ getHint,
102
+ getCorrection,
103
+ getAnswer,
104
+ };
@@ -28,3 +28,4 @@ __exportStar(require("./basicTrigoSystemEquation"), exports);
28
28
  __exportStar(require("./mainAngleMeasure"), exports);
29
29
  __exportStar(require("./degreeToRadians"), exports);
30
30
  __exportStar(require("./arcLength"), exports);
31
+ // export * from "./equationCosOnRandomInterval";
package/lib/index.d.ts CHANGED
@@ -564,14 +564,20 @@ declare const mathExercises: (import("./exercises/exercise").Exercise<{
564
564
  G2x: number;
565
565
  G2y: number;
566
566
  G1y: number;
567
+ xValues: number[];
568
+ yValues: number[];
567
569
  }> | import("./exercises/exercise").Exercise<{
568
570
  rSquared: number;
571
+ xValues: number[];
572
+ yValues: number[];
569
573
  }> | import("./exercises/exercise").Exercise<{
570
574
  G1x: number;
571
575
  G2x: number;
572
576
  G2y: number;
573
577
  G1y: number;
574
578
  rSquared: number;
579
+ xValues: number[];
580
+ yValues: number[];
575
581
  }> | import("./exercises/exercise").Exercise<{
576
582
  trinomial: number[];
577
583
  leftbound: number;
@@ -1087,7 +1093,10 @@ declare const mathExercises: (import("./exercises/exercise").Exercise<{
1087
1093
  }> | import("./exercises/exercise").Exercise<{
1088
1094
  total: number;
1089
1095
  lefties: number;
1090
- }> | import("./exercises/exercise").Exercise<{}> | import("./exercises/exercise").Exercise<{
1096
+ }> | import("./exercises/exercise").Exercise<{
1097
+ xValues: number[];
1098
+ yValues: number[];
1099
+ }> | import("./exercises/exercise").Exercise<{
1091
1100
  evolution: number;
1092
1101
  }> | import("./exercises/exercise").Exercise<{
1093
1102
  TVA: number;
@@ -1198,6 +1207,7 @@ declare const mathExercises: (import("./exercises/exercise").Exercise<{
1198
1207
  rand: number;
1199
1208
  }> | import("./exercises/exercise").Exercise<{
1200
1209
  randomValues: number[];
1210
+ randomEffectives: number[];
1201
1211
  }> | import("./exercises/exercise").Exercise<{
1202
1212
  sortedValues: number[];
1203
1213
  }> | import("./exercises/exercise").Exercise<{
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],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;;;;;;;;;;;;;;;;;;;;;;;;;;KAA6B,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,CAAC"}
@@ -1,4 +1,6 @@
1
1
  import { AlgebraicNode } from "../../tree/nodes/algebraicNode";
2
+ import { NumberNode } from "../../tree/nodes/numbers/numberNode";
3
+ import { MultiplyNode } from "../../tree/nodes/operators/multiplyNode";
2
4
  export interface RemarkableValue {
3
5
  angle: AlgebraicNode;
4
6
  cos: AlgebraicNode;
@@ -11,4 +13,12 @@ export declare const negativeMainTrigovalues: RemarkableValue[];
11
13
  export declare const remarkableTrigoValues: RemarkableValue[];
12
14
  export declare const mainTrigoValues: RemarkableValue[];
13
15
  export declare const mainPositiveTrigovalues: RemarkableValue[];
16
+ export declare const trigoValuesOnZeroTwoPIOF: (RemarkableValue | {
17
+ angle: MultiplyNode;
18
+ degree: number;
19
+ cos: NumberNode;
20
+ sin: NumberNode;
21
+ tan: NumberNode;
22
+ point: string;
23
+ })[];
14
24
  //# sourceMappingURL=remarkableValues.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"remarkableValues.d.ts","sourceRoot":"","sources":["../../../src/math/trigonometry/remarkableValues.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAQ/D,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,aAAa,CAAC;IACrB,GAAG,EAAE,aAAa,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,aAAa,CAAC;IACnB,GAAG,EAAE,aAAa,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,uBAAuB,EAAE,eAAe,EAoGpD,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,eAAe,EA2LlD,CAAC;AAEF,eAAO,MAAM,eAAe,mBAG3B,CAAC;AAEF,eAAO,MAAM,uBAAuB,mBAAoC,CAAC"}
1
+ {"version":3,"file":"remarkableValues.d.ts","sourceRoot":"","sources":["../../../src/math/trigonometry/remarkableValues.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAG/D,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAGjE,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAEvE,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,aAAa,CAAC;IACrB,GAAG,EAAE,aAAa,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,aAAa,CAAC;IACnB,GAAG,EAAE,aAAa,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,uBAAuB,EAAE,eAAe,EAoGpD,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,eAAe,EA2LlD,CAAC;AAEF,eAAO,MAAM,eAAe,mBAG3B,CAAC;AAEF,eAAO,MAAM,uBAAuB,mBAAoC,CAAC;AAEzE,eAAO,MAAM,wBAAwB;;;;;;;IAUpC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.mainPositiveTrigovalues = exports.mainTrigoValues = exports.remarkableTrigoValues = exports.negativeMainTrigovalues = void 0;
3
+ exports.trigoValuesOnZeroTwoPIOF = exports.mainPositiveTrigovalues = exports.mainTrigoValues = exports.remarkableTrigoValues = exports.negativeMainTrigovalues = void 0;
4
4
  const oppositeNode_1 = require("../../tree/nodes/functions/oppositeNode");
5
5
  const sqrtNode_1 = require("../../tree/nodes/functions/sqrtNode");
6
6
  const numberNode_1 = require("../../tree/nodes/numbers/numberNode");
@@ -208,3 +208,14 @@ exports.mainTrigoValues = [
208
208
  ...exports.remarkableTrigoValues.slice(1).slice(0, 8),
209
209
  ];
210
210
  exports.mainPositiveTrigovalues = exports.remarkableTrigoValues.slice(0, 9);
211
+ exports.trigoValuesOnZeroTwoPIOF = [
212
+ ...exports.remarkableTrigoValues.slice(1),
213
+ {
214
+ angle: new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(2), piNode_1.PiNode),
215
+ degree: 0,
216
+ cos: new numberNode_1.NumberNode(1),
217
+ sin: new numberNode_1.NumberNode(0),
218
+ tan: new numberNode_1.NumberNode(0),
219
+ point: "I",
220
+ },
221
+ ];
@@ -0,0 +1,2 @@
1
+ export declare const dollarize: (text: string | number) => string;
2
+ //# sourceMappingURL=dollarize.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dollarize.d.ts","sourceRoot":"","sources":["../../../src/utils/latex/dollarize.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,SAAU,MAAM,GAAG,MAAM,WAE9C,CAAC"}
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.dollarize = void 0;
4
+ const dollarize = (text) => {
5
+ return `$${text}$`;
6
+ };
7
+ exports.dollarize = dollarize;
@@ -0,0 +1,2 @@
1
+ export declare const mdTable: (rows: (string | number)[][]) => string;
2
+ //# sourceMappingURL=mdTable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mdTable.d.ts","sourceRoot":"","sources":["../../../src/utils/markdown/mdTable.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,OAAO,SAAU,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,EAAE,WASlD,CAAC"}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.mdTable = void 0;
4
+ const rowBuilder = (row) => {
5
+ return "|" + row.join("|") + "|";
6
+ };
7
+ const mdTable = (rows) => {
8
+ const width = rows[0].length;
9
+ return `
10
+ <!-- table -->
11
+ ${rowBuilder(rows[0])}
12
+ ${rowBuilder(new Array(width).fill("-"))}
13
+ ${rows.slice(1).map(rowBuilder).join("\n")}
14
+ <!-- !table -->
15
+ `;
16
+ };
17
+ exports.mdTable = mdTable;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "math-exercises",
3
- "version": "2.2.32",
3
+ "version": "2.2.34",
4
4
  "description": "Math exercises generator for middle school and high school",
5
5
  "main": "lib/index.js",
6
6
  "files": [