math-exercises 3.0.206 → 3.0.207

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.
@@ -1 +1 @@
1
- {"version":3,"file":"signTableFromVarTableWithZeroes.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/continuity/signTableFromVarTableWithZeroes.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AAyJF,eAAO,MAAM,+BAA+B,EAAE,QAAQ,CAAC,WAAW,CAqBjE,CAAC"}
1
+ {"version":3,"file":"signTableFromVarTableWithZeroes.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/continuity/signTableFromVarTableWithZeroes.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AAgKF,eAAO,MAAM,+BAA+B,EAAE,QAAQ,CAAC,WAAW,CAqBjE,CAAC"}
@@ -103,13 +103,22 @@ const getSignTableFromVarTableWithZeroesQuestion = () => {
103
103
  for (let i = 0; i < 3; i++) {
104
104
  const prevY = yValues[i];
105
105
  if (nonZeroInterval === i) {
106
- if (prevY < 0) {
107
- //on doit descendre car on remontera post 0 après
108
- yValues.push(randint(-15, prevY));
106
+ if (i === 0) {
107
+ if (prevY < 0) {
108
+ //on doit descendre car on remontera post 0 après
109
+ yValues.push(randint(-15, prevY));
110
+ }
111
+ else {
112
+ //on doit monter car on descendra post 0 après
113
+ yValues.push(randint(prevY + 1, 15));
114
+ }
109
115
  }
110
116
  else {
111
- //on doit monter car on descendra post 0 après
112
- yValues.push(randint(prevY, 15));
117
+ const prevPrevY = yValues[i - 1];
118
+ if (prevY < prevPrevY)
119
+ yValues.push(randint(prevY + 1, 15, [0]));
120
+ else
121
+ yValues.push(randint(-15, prevY, [0]));
113
122
  }
114
123
  }
115
124
  else {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "math-exercises",
3
3
  "type": "module",
4
- "version": "3.0.206",
4
+ "version": "3.0.207",
5
5
  "description": "Math exercises generator for middle school and high school",
6
6
  "main": "lib/index.js",
7
7
  "files": [