math-exercises 3.0.22 → 3.0.24
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 +2 -0
- package/lib/exercises/exercise.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/secondIdentity.js +1 -1
- package/lib/exercises/math/calculLitteral/equation/multiplicationEquation.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/multiplicationEquation.js +60 -28
- package/lib/exercises/math/dataRepresentations/functionGraphReading.d.ts +104 -0
- package/lib/exercises/math/dataRepresentations/functionGraphReading.d.ts.map +1 -1
- package/lib/exercises/math/dataRepresentations/functionGraphReading.js +119 -94
- package/lib/exercises/math/dataRepresentations/index.d.ts +1 -0
- package/lib/exercises/math/dataRepresentations/index.d.ts.map +1 -1
- package/lib/exercises/math/dataRepresentations/index.js +1 -0
- package/lib/exercises/math/dataRepresentations/pieChartReading.d.ts +8 -0
- package/lib/exercises/math/dataRepresentations/pieChartReading.d.ts.map +1 -0
- package/lib/exercises/math/dataRepresentations/pieChartReading.js +171 -0
- package/lib/exercises/math/derivation/derivative/constanteDerivative.js +2 -2
- package/lib/exercises/math/derivation/derivative/secondDegreeDerivative.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/secondDegreeDerivative.js +5 -3
- package/lib/exercises/math/derivation/derivative/thirdDegreeDerivative.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/thirdDegreeDerivative.js +5 -3
- package/lib/exercises/math/functions/exponential/expFactorization.d.ts.map +1 -1
- package/lib/exercises/math/functions/exponential/expFactorization.js +5 -2
- package/lib/exercises/math/geometry/euclidian/pythagoreOrThales.d.ts.map +1 -1
- package/lib/exercises/math/geometry/euclidian/pythagoreOrThales.js +3 -0
- package/lib/exercises/math/geometry/quadrilaterals/quadrilateralRecognition.js +2 -1
- package/lib/exercises/math/primitive/polynomialPrimitive.d.ts.map +1 -1
- package/lib/exercises/math/primitive/polynomialPrimitive.js +47 -16
- package/lib/exercises/math/probaStat/probaFromTableWithContext.js +3 -3
- package/lib/exercises/math/probaStat/stats1var/averageList.js +1 -1
- package/lib/exercises/math/probaStat/stats1var/choseReasoningForIndicator.d.ts +8 -0
- package/lib/exercises/math/probaStat/stats1var/choseReasoningForIndicator.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/stats1var/choseReasoningForIndicator.js +105 -0
- package/lib/exercises/math/probaStat/stats1var/index.d.ts +1 -0
- package/lib/exercises/math/probaStat/stats1var/index.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/index.js +1 -0
- package/lib/exercises/math/spaceGeometry/basis/index.d.ts +2 -0
- package/lib/exercises/math/spaceGeometry/basis/index.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/basis/index.js +1 -0
- package/lib/exercises/math/spaceGeometry/basis/spaceCoordinatesInPrism.d.ts +11 -0
- package/lib/exercises/math/spaceGeometry/basis/spaceCoordinatesInPrism.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/basis/spaceCoordinatesInPrism.js +167 -0
- package/lib/exercises/math/spaceGeometry/index.d.ts +1 -0
- package/lib/exercises/math/spaceGeometry/index.d.ts.map +1 -1
- package/lib/exercises/math/spaceGeometry/index.js +1 -0
- package/lib/exercises/math/trigonometry/calculateCosSinAndTan.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/calculateCosSinAndTan.js +38 -26
- package/lib/geogebra/colors.d.ts +1 -0
- package/lib/geogebra/colors.d.ts.map +1 -1
- package/lib/geogebra/colors.js +3 -0
- package/lib/geogebra/geogebraConstructor.d.ts +2 -0
- package/lib/geogebra/geogebraConstructor.d.ts.map +1 -1
- package/lib/geogebra/geogebraConstructor.js +6 -0
- package/lib/index.d.ts +12 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/latexTester.d.ts.map +1 -1
- package/lib/latexTester.js +7 -1
- package/lib/math/geometry/angle.d.ts +2 -0
- package/lib/math/geometry/angle.d.ts.map +1 -1
- package/lib/math/geometry/angle.js +11 -4
- package/lib/math/geometry/spacePoint.d.ts +3 -1
- package/lib/math/geometry/spacePoint.d.ts.map +1 -1
- package/lib/math/geometry/spacePoint.js +19 -2
- package/lib/math/spaceGeometry/prism.d.ts +4 -0
- package/lib/math/spaceGeometry/prism.d.ts.map +1 -0
- package/lib/math/spaceGeometry/prism.js +3 -0
- package/lib/tree/nodes/algebraicNode.d.ts +4 -1
- package/lib/tree/nodes/algebraicNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/cosNode.d.ts +2 -2
- package/lib/tree/nodes/functions/cosNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/cosNode.js +4 -1
- package/lib/tree/nodes/functions/sinNode.d.ts +2 -2
- package/lib/tree/nodes/functions/sinNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/sinNode.js +4 -1
- package/lib/tree/nodes/functions/tanNode.d.ts +2 -2
- package/lib/tree/nodes/functions/tanNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/tanNode.js +4 -1
- package/lib/utils/strings/getLetter.d.ts +2 -0
- package/lib/utils/strings/getLetter.d.ts.map +1 -0
- package/lib/utils/strings/getLetter.js +3 -0
- package/package.json +1 -1
|
@@ -70,7 +70,10 @@ export class SinNode {
|
|
|
70
70
|
}
|
|
71
71
|
return new SinNode(simplifiedChild);
|
|
72
72
|
}
|
|
73
|
-
evaluate(vars) {
|
|
73
|
+
evaluate(vars, opts) {
|
|
74
|
+
if (opts?.degreeMode) {
|
|
75
|
+
return Math.sin((this.child.evaluate(vars, opts) * Math.PI) / 180);
|
|
76
|
+
}
|
|
74
77
|
return Math.sin(this.child.evaluate(vars));
|
|
75
78
|
}
|
|
76
79
|
equals(node) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Node, NodeIds, NodeType } from "../node.js";
|
|
2
2
|
import { FunctionNode, FunctionsIds } from "./functionNode.js";
|
|
3
|
-
import { AlgebraicNode, SimplifyOptions } from "../algebraicNode.js";
|
|
3
|
+
import { AlgebraicNode, EvaluateOptions, SimplifyOptions } from "../algebraicNode.js";
|
|
4
4
|
export declare const tan: (a: AlgebraicNode | number | string) => TanNode;
|
|
5
5
|
export declare function isTanNode(a: Node): a is TanNode;
|
|
6
6
|
export declare class TanNode implements FunctionNode {
|
|
@@ -20,7 +20,7 @@ export declare class TanNode implements FunctionNode {
|
|
|
20
20
|
toEquivalentNodes(): AlgebraicNode[];
|
|
21
21
|
toAllValidTexs(): string[];
|
|
22
22
|
simplify(opts?: SimplifyOptions): AlgebraicNode;
|
|
23
|
-
evaluate(vars?: Record<string, number
|
|
23
|
+
evaluate(vars?: Record<string, number>, opts?: EvaluateOptions): number;
|
|
24
24
|
equals(node: AlgebraicNode): boolean;
|
|
25
25
|
toDetailedEvaluation(vars: Record<string, AlgebraicNode>): TanNode;
|
|
26
26
|
derivative(varName?: string | undefined): AlgebraicNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tanNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/functions/tanNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAkB,MAAM,mBAAmB,CAAC;AAC/E,OAAO,
|
|
1
|
+
{"version":3,"file":"tanNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/functions/tanNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAkB,MAAM,mBAAmB,CAAC;AAC/E,OAAO,EACL,aAAa,EACb,eAAe,EACf,eAAe,EAChB,MAAM,qBAAqB,CAAC;AAI7B,eAAO,MAAM,GAAG,MAAO,aAAa,GAAG,MAAM,GAAG,MAAM,YAIrD,CAAC;AAEF,wBAAgB,SAAS,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,IAAI,OAAO,CAE/C;AAED,qBAAa,OAAQ,YAAW,YAAY;IAC1C,EAAE,EAAE,YAAY,CAAC;IACjB,KAAK,EAAE,aAAa,CAAC;IACrB,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;gBAEP,KAAK,EAAE,aAAa;IAMhC,aAAa;;;;;;IAMb,YAAY,IAAI,MAAM;IAItB,KAAK,IAAI,MAAM;IAIf,iBAAiB,IAAI,aAAa,EAAE;IASpC,cAAc,IAAI,MAAM,EAAE;IAI1B,QAAQ,CAAC,IAAI,GAAE,eAAoB,GAAG,aAAa;IAsBnD,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,IAAI,CAAC,EAAE,eAAe;IAO9D,MAAM,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO;IAGpC,oBAAoB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC;IAGxD,UAAU,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,aAAa;CAGxD"}
|
|
@@ -65,7 +65,10 @@ export class TanNode {
|
|
|
65
65
|
}
|
|
66
66
|
return new TanNode(simplifiedChild);
|
|
67
67
|
}
|
|
68
|
-
evaluate(vars) {
|
|
68
|
+
evaluate(vars, opts) {
|
|
69
|
+
if (opts?.degreeMode) {
|
|
70
|
+
return Math.tan((this.child.evaluate(vars, opts) * Math.PI) / 180);
|
|
71
|
+
}
|
|
69
72
|
return Math.tan(this.child.evaluate(vars));
|
|
70
73
|
}
|
|
71
74
|
equals(node) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getLetter.d.ts","sourceRoot":"","sources":["../../../src/utils/strings/getLetter.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,MAAO,MAAM,QAAQ,OAAO,WAEjD,CAAC"}
|