math-exercises 3.0.48 → 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/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/index.d.ts +28 -7
- package/lib/index.d.ts.map +1 -1
- 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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pointParser.d.ts","sourceRoot":"","sources":["../../../src/tree/parsers/pointParser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAKrD,eAAO,MAAM,WAAW,QAAS,MAAM,kBAUtC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Point } from "../../math/geometry/point.js";
|
|
2
|
+
import { parseAlgebraic } from "./latexParser.js";
|
|
3
|
+
export const pointParser = (ans) => {
|
|
4
|
+
const formated = ans
|
|
5
|
+
.replaceAll("\\left", "")
|
|
6
|
+
.replaceAll("\\right", "")
|
|
7
|
+
.replaceAll("(", "")
|
|
8
|
+
.replaceAll(")", "");
|
|
9
|
+
const coords = formated.split(";").map((e) => parseAlgebraic(e));
|
|
10
|
+
if (coords.length !== 2)
|
|
11
|
+
return false;
|
|
12
|
+
return new Point("A", coords[0], coords[1]);
|
|
13
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spacePointParser.d.ts","sourceRoot":"","sources":["../../../src/tree/parsers/spacePointParser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAG/D,eAAO,MAAM,gBAAgB,QAAS,MAAM,
|
|
1
|
+
{"version":3,"file":"spacePointParser.d.ts","sourceRoot":"","sources":["../../../src/tree/parsers/spacePointParser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAG/D,eAAO,MAAM,gBAAgB,QAAS,MAAM,uBAY3C,CAAC"}
|
|
@@ -9,6 +9,8 @@ export const spacePointParser = (ans) => {
|
|
|
9
9
|
const coords = formated.split(";").map((e) => valueParser(e));
|
|
10
10
|
if (coords?.some((e) => e === false))
|
|
11
11
|
return false;
|
|
12
|
+
if (coords.length !== 3)
|
|
13
|
+
return false;
|
|
12
14
|
const trees = coords.map((e) => e.toTree());
|
|
13
15
|
return new SpacePoint("A", trees[0], trees[1], trees[2]);
|
|
14
16
|
};
|