math-exercises 2.2.48 → 2.2.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/exercise.d.ts +5 -1
- package/lib/exercises/exercise.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionsSum.d.ts +1 -1
- package/lib/exercises/math/calcul/fractions/fractionsSum.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionsSum.js +12 -4
- package/lib/exercises/math/calcul/fractions/fractionsSumsMultiplesDenominators.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionsSumsMultiplesDenominators.js +33 -5
- package/lib/exercises/math/calcul/fractions/fractionsSumsPrimeDenominators.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionsSumsPrimeDenominators.js +39 -5
- package/lib/exercises/math/calcul/fractions/fractionsSumsSameDenominators.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionsSumsSameDenominators.js +33 -8
- 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/parametric/extractPointFromParametricLine.d.ts +8 -0
- package/lib/exercises/math/geometry/parametric/extractPointFromParametricLine.d.ts.map +1 -0
- package/lib/exercises/math/geometry/parametric/extractPointFromParametricLine.js +110 -0
- package/lib/exercises/math/geometry/parametric/extractVectorFromParametricLine.d.ts +8 -0
- package/lib/exercises/math/geometry/parametric/extractVectorFromParametricLine.d.ts.map +1 -0
- package/lib/exercises/math/geometry/parametric/extractVectorFromParametricLine.js +108 -0
- package/lib/exercises/math/geometry/parametric/index.d.ts +4 -0
- package/lib/exercises/math/geometry/parametric/index.d.ts.map +1 -0
- package/lib/exercises/math/geometry/parametric/index.js +19 -0
- package/lib/exercises/math/geometry/parametric/pointFromParametricLine.d.ts +12 -0
- package/lib/exercises/math/geometry/parametric/pointFromParametricLine.d.ts.map +1 -0
- package/lib/exercises/math/geometry/parametric/pointFromParametricLine.js +95 -0
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormula.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormula.js +66 -24
- package/lib/index.d.ts +14 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/math/geometry/parametricLine.d.ts +15 -0
- package/lib/math/geometry/parametricLine.d.ts.map +1 -0
- package/lib/math/geometry/parametricLine.js +47 -0
- package/lib/math/geometry/spacePoint.d.ts +3 -0
- package/lib/math/geometry/spacePoint.d.ts.map +1 -1
- package/lib/math/geometry/spacePoint.js +12 -0
- package/lib/math/geometry/spaceVector.d.ts +5 -0
- package/lib/math/geometry/spaceVector.d.ts.map +1 -1
- package/lib/math/geometry/spaceVector.js +20 -0
- package/lib/server.js +7 -3
- package/lib/tree/parsers/rationalParser.d.ts +2 -0
- package/lib/tree/parsers/rationalParser.d.ts.map +1 -1
- package/lib/tree/parsers/rationalParser.js +33 -8
- package/lib/tree/parsers/spacePointParser.d.ts +3 -0
- package/lib/tree/parsers/spacePointParser.d.ts.map +1 -0
- package/lib/tree/parsers/spacePointParser.js +18 -0
- package/lib/tree/parsers/spaceVectorParser.d.ts +3 -0
- package/lib/tree/parsers/spaceVectorParser.d.ts.map +1 -0
- package/lib/tree/parsers/spaceVectorParser.js +18 -0
- package/lib/tree/parsers/valueParser.d.ts +2 -0
- package/lib/tree/parsers/valueParser.d.ts.map +1 -0
- package/lib/tree/parsers/valueParser.js +10 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spaceVectorParser.d.ts","sourceRoot":"","sources":["../../../src/tree/parsers/spaceVectorParser.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAE9D,eAAO,MAAM,iBAAiB,QAAS,MAAM,wBAW5C,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.spaceVectorParser = void 0;
|
|
4
|
+
const valueParser_1 = require("./valueParser");
|
|
5
|
+
const spaceVector_1 = require("../../math/geometry/spaceVector");
|
|
6
|
+
const spaceVectorParser = (ans) => {
|
|
7
|
+
const formated = ans
|
|
8
|
+
.replaceAll("\\left", "")
|
|
9
|
+
.replaceAll("\\right", "")
|
|
10
|
+
.replaceAll("(", "")
|
|
11
|
+
.replaceAll(")", "");
|
|
12
|
+
const coords = formated.split(";").map((e) => (0, valueParser_1.valueParser)(e));
|
|
13
|
+
if (coords?.some((e) => e === false))
|
|
14
|
+
return false;
|
|
15
|
+
const trees = coords.map((e) => e.toTree());
|
|
16
|
+
return new spaceVector_1.SpaceVector("A", trees[0], trees[1], trees[2]);
|
|
17
|
+
};
|
|
18
|
+
exports.spaceVectorParser = spaceVectorParser;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"valueParser.d.ts","sourceRoot":"","sources":["../../../src/tree/parsers/valueParser.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,QAAS,MAAM,mBAItC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.valueParser = void 0;
|
|
4
|
+
const valueParser = (ans) => {
|
|
5
|
+
const nb = ans.unfrenchify();
|
|
6
|
+
if (isNaN(nb))
|
|
7
|
+
return false;
|
|
8
|
+
return nb;
|
|
9
|
+
};
|
|
10
|
+
exports.valueParser = valueParser;
|