math-exercises 1.3.64 → 1.3.65

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":"inverseImageFunctionGeogebra.d.ts","sourceRoot":"","sources":["../../../../src/exercises/functions/basics/inverseImageFunctionGeogebra.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAS3E,eAAO,MAAM,4BAA4B,EAAE,QAY1C,CAAC;AAEF,wBAAgB,+BAA+B,IAAI,QAAQ,CAsJ1D"}
1
+ {"version":3,"file":"inverseImageFunctionGeogebra.d.ts","sourceRoot":"","sources":["../../../../src/exercises/functions/basics/inverseImageFunctionGeogebra.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAe,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAS3E,eAAO,MAAM,4BAA4B,EAAE,QAY1C,CAAC;AAEF,wBAAgB,+BAA+B,IAAI,QAAQ,CA4J1D"}
@@ -141,7 +141,13 @@ function getInverseImageFunctionGeogebra() {
141
141
  }
142
142
  return (0, shuffle_1.shuffle)(res);
143
143
  };
144
- const commands = [rand ? polynome1.toString() : polynome2.add(new polynomial_1.Polynomial([yValue])).toString()];
144
+ const commands = [
145
+ rand
146
+ ? polynome1.toString()
147
+ : yValue !== 0
148
+ ? polynome2.add(new polynomial_1.Polynomial([yValue])).toString()
149
+ : polynome2.toString(),
150
+ ];
145
151
  const question = {
146
152
  instruction: statement,
147
153
  answer: answer + '',
@@ -127,7 +127,7 @@ function getInequalityToIntervalQuestion() {
127
127
  const question = {
128
128
  answer,
129
129
  instruction: instruction,
130
- keys: ['x', 'belongs', 'inf', 'sup', 'geq', 'leq', 'lbracket', 'rbracket', 'semicolon'],
130
+ keys: ['x', 'belongs', 'inf', 'sup', 'geq', 'leq', 'lbracket', 'rbracket', 'semicolon', 'infty'],
131
131
  getPropositions,
132
132
  answerFormat: 'tex',
133
133
  };
@@ -216,19 +216,19 @@ class Interval {
216
216
  const isRightClosed = this.boundType === BoundType.FF || this.boundType === BoundType.OF;
217
217
  if (this.max === Infinity) {
218
218
  if (isLeftClosed) {
219
- return `x \\ge ${this.min}`;
219
+ return `x\\ge${this.min}`;
220
220
  }
221
221
  else
222
- return `x > ${this.min}`;
222
+ return `x>${this.min}`;
223
223
  }
224
224
  else if (this.min === -Infinity) {
225
225
  if (this.boundType === BoundType.OF) {
226
- return `x \\le ${this.max}`;
226
+ return `x\\le${this.max}`;
227
227
  }
228
228
  else
229
- return `x < ${this.max}`;
229
+ return `x<${this.max}`;
230
230
  }
231
- return `${this.min} ${isLeftClosed ? '\\le' : '<'} x ${isRightClosed ? '\\le' : '<'} ${this.max}`;
231
+ return `${this.min}${isLeftClosed ? '\\le x' : '<x'}${isRightClosed ? '\\le' : '<'}${this.max}`;
232
232
  }
233
233
  getRandomElement(precision = this.type === nombre_1.NumberType.Integer ? 0 : 2) {
234
234
  if (this.min === -Infinity || this.max === Infinity)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "math-exercises",
3
- "version": "1.3.64",
3
+ "version": "1.3.65",
4
4
  "description": "Math exercises generator for middle school and high school",
5
5
  "main": "lib/index.js",
6
6
  "files": [