math-exercises 2.2.26 → 2.2.28
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 -1
- package/lib/exercises/exercise.d.ts.map +1 -1
- package/lib/exercises/exercise.js +1 -1
- package/lib/exercises/math/calcul/addAndSub.js +1 -1
- package/lib/exercises/math/calcul/addAndSubWithoutRelatives.js +1 -1
- package/lib/exercises/math/calcul/arithmetics/commonDivisorsList.js +1 -1
- package/lib/exercises/math/calcul/arithmetics/divisibiltyCriteria.js +1 -1
- package/lib/exercises/math/calcul/arithmetics/divisorsList.js +1 -1
- package/lib/exercises/math/calcul/arithmetics/paritySumsAndProducts.js +1 -1
- package/lib/exercises/math/calcul/decimals/multiplyDecimalByTens.js +1 -1
- package/lib/exercises/math/calcul/fractions/fractionAndIntegerDivision.js +1 -1
- package/lib/exercises/math/calcul/fractions/fractionAndIntegerProduct.js +1 -1
- package/lib/exercises/math/calcul/fractions/fractionAndIntegerSum.js +1 -1
- package/lib/exercises/math/calcul/fractions/fractionToPercentToDecimal.js +1 -1
- package/lib/exercises/math/calcul/fractions/fractionsDivision.js +1 -1
- package/lib/exercises/math/calcul/fractions/fractionsProduct.js +1 -1
- package/lib/exercises/math/calcul/fractions/fractionsSum.js +1 -1
- package/lib/exercises/math/calcul/fractions/fractionsSumsMultiplesDenominators.js +1 -1
- package/lib/exercises/math/calcul/fractions/simplifyFraction.js +1 -1
- package/lib/exercises/math/calcul/index.js +1 -0
- package/lib/exercises/math/calcul/mentalCaluls/mentalAddAndSub.js +2 -2
- package/lib/exercises/math/calcul/mentalCaluls/mentalDivisions.js +2 -2
- package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplications.js +2 -2
- package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplicationsNoRelative.js +2 -2
- package/lib/exercises/math/calcul/mentalCaluls/mentalPercentage.js +2 -2
- package/lib/exercises/math/calcul/operations/expressionNature.js +1 -1
- package/lib/exercises/math/calcul/operations/operationsPriorities.js +2 -2
- package/lib/exercises/math/calcul/operations/operationsPrioritiesParenthesis.js +1 -1
- package/lib/exercises/math/calcul/operations/operationsPrioritiesParenthesisNoRelatives.js +1 -1
- package/lib/exercises/math/calcul/operations/operationsPrioritiesWithoutRelative.js +2 -2
- package/lib/exercises/math/calcul/ordering/decimalOrdering.js +1 -1
- package/lib/exercises/math/calcul/ordering/decimalOrderingNoRelatives.js +1 -1
- package/lib/exercises/math/calcul/ordering/framing.js +2 -2
- package/lib/exercises/math/calcul/ordering/integerOrdering.js +2 -2
- package/lib/exercises/math/calcul/proportionality/proportionalityTable.js +1 -1
- package/lib/exercises/math/calcul/proportionality/proportionalityTableCoefficient.js +1 -1
- package/lib/exercises/math/calcul/proportionality/scaleCalculation.js +1 -1
- package/lib/exercises/math/calcul/proportionality/scaleUsage.js +1 -1
- package/lib/exercises/math/calcul/rounding/rounding.d.ts.map +1 -1
- package/lib/exercises/math/calcul/rounding/rounding.js +5 -6
- package/lib/exercises/math/calcul/writing/index.d.ts +2 -0
- package/lib/exercises/math/calcul/writing/index.d.ts.map +1 -0
- package/lib/exercises/math/calcul/writing/index.js +17 -0
- package/lib/exercises/math/calcul/writing/numberToFrenchWriting.d.ts +7 -0
- package/lib/exercises/math/calcul/writing/numberToFrenchWriting.d.ts.map +1 -0
- package/lib/exercises/math/calcul/writing/numberToFrenchWriting.js +67 -0
- package/lib/exercises/math/calculLitteral/distributivity/allIdentities.js +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivity.js +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/firstIdentity.js +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/secondIdentity.js +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/simpleDistributivity.js +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/thirdIdentity.js +1 -1
- package/lib/exercises/math/calculLitteral/equation/binomialsTrinomialsProposedSolutions.js +1 -1
- package/lib/exercises/math/calculLitteral/equation/equationFromSentenceExercise.js +1 -1
- package/lib/exercises/math/calculLitteral/equation/equationSimpleSquare.js +3 -3
- package/lib/exercises/math/calculLitteral/equation/equationType1Exercise.js +1 -1
- package/lib/exercises/math/calculLitteral/equation/equationType2Exercise.js +1 -1
- package/lib/exercises/math/calculLitteral/equation/equationType3Exercise.js +1 -1
- package/lib/exercises/math/calculLitteral/equation/equationType4Exercise.js +1 -1
- package/lib/exercises/math/calculLitteral/equation/firstDegreeEquation.js +1 -1
- package/lib/exercises/math/calculLitteral/equation/fractionEquation.js +1 -1
- package/lib/exercises/math/calculLitteral/equation/multiplicationEquation.js +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq1.js +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq2.js +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.js +2 -2
- package/lib/exercises/math/calculLitteral/factorisation/factoType2.js +1 -1
- package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType0.js +2 -2
- package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType1.js +2 -2
- package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType2.js +2 -2
- package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType3.js +2 -2
- package/lib/exercises/math/calculLitteral/inequations/squareFunctionInequation.js +1 -1
- package/lib/exercises/math/calculLitteral/simplifying/distributeAndSimplify.js +1 -1
- package/lib/exercises/math/calculLitteral/simplifying/evaluateExpression.js +2 -2
- package/lib/exercises/math/calculLitteral/simplifying/reduceExpression.js +1 -1
- package/lib/exercises/math/calculLitteral/systems/basicNiceValuesSystemResolution.js +1 -1
- package/lib/exercises/math/calculLitteral/systems/basicSystemResolution.js +1 -1
- package/lib/exercises/math/calculLitteral/systems/verifySystemSolution.js +1 -1
- package/lib/exercises/math/combinatory/anagrams.js +1 -1
- package/lib/exercises/math/complex/addComplex.js +1 -1
- package/lib/exercises/math/complex/argumentFromAlgebraicComplex.js +1 -1
- package/lib/exercises/math/complex/conjugateComplex.ts.js +1 -1
- package/lib/exercises/math/complex/conjugateDivideComplex.js +1 -1
- package/lib/exercises/math/complex/conjugateMultiplyComplex.js +1 -1
- package/lib/exercises/math/complex/divideComplex.js +1 -1
- package/lib/exercises/math/complex/inverseComplex.js +1 -1
- package/lib/exercises/math/complex/linearCombinaisonComplex.js +1 -1
- package/lib/exercises/math/complex/mutiplyComplex.js +1 -1
- package/lib/exercises/math/complex/reAndIm.js +2 -2
- package/lib/exercises/math/conversion/aeraConversion.js +1 -1
- package/lib/exercises/math/conversion/capacityConversion.js +1 -1
- package/lib/exercises/math/conversion/hoursToDecimal.js +1 -1
- package/lib/exercises/math/conversion/lengthConversion.js +1 -1
- package/lib/exercises/math/conversion/massConversion.js +1 -1
- package/lib/exercises/math/conversion/volumeCapacityConversion.js +2 -2
- package/lib/exercises/math/conversion/volumeConversion.js +1 -1
- package/lib/exercises/math/derivation/derivative/convexityQuadrinomials.js +1 -1
- package/lib/exercises/math/derivation/derivative/lnDerivativeTwo.js +1 -1
- package/lib/exercises/math/derivation/derivative/rootFunctionDerivative.js +1 -1
- package/lib/exercises/math/derivation/derivative/secondDegreeDerivative.js +1 -1
- package/lib/exercises/math/derivation/derivative/thirdDegreeFunctionVariation.js +2 -2
- package/lib/exercises/math/derivation/tangent/derivativeNumberReading.js +1 -1
- package/lib/exercises/math/derivation/tangent/derivativeTangentEquationReading.js +1 -1
- package/lib/exercises/math/equaDiff/equaDiffCheckSolutionFirstOrder.js +2 -2
- package/lib/exercises/math/equaDiff/equaDiffGeneralForme.js +1 -1
- package/lib/exercises/math/equaDiff/equaDiffGeneralFormeWithIC.js +1 -1
- package/lib/exercises/math/functions/absolute/absoluteValueEquations.js +2 -2
- package/lib/exercises/math/functions/absolute/absoluteValueInequations.js +1 -1
- package/lib/exercises/math/functions/affines/affineExpressionFromTwoImages.js +1 -1
- package/lib/exercises/math/functions/affines/leadingCoeffAndOriginOrdinate.js +1 -1
- package/lib/exercises/math/functions/affines/leadingCoefficient.js +1 -1
- package/lib/exercises/math/functions/affines/leadingCoefficientCalculV1.js +1 -1
- package/lib/exercises/math/functions/affines/leadingCoefficientCalculV2.js +1 -1
- package/lib/exercises/math/functions/affines/signFunction.js +2 -2
- package/lib/exercises/math/functions/basics/graphicEquation.js +1 -1
- package/lib/exercises/math/functions/basics/graphicInequation.js +1 -1
- package/lib/exercises/math/functions/basics/imageFunction.js +2 -2
- package/lib/exercises/math/functions/basics/imageFunctionGeogebra.js +2 -2
- package/lib/exercises/math/functions/basics/inverseImageFunction.js +1 -1
- package/lib/exercises/math/functions/basics/inverseImageFunctionGeogebra.js +2 -2
- package/lib/exercises/math/functions/basics/inverseImageFunctionTable.js +3 -3
- package/lib/exercises/math/functions/basics/twoFunctionsEquation.js +2 -2
- package/lib/exercises/math/functions/basics/twoFunctionsInequation.js +2 -2
- package/lib/exercises/math/functions/cube/cubicEquation.js +1 -1
- package/lib/exercises/math/functions/exponential/expEquation.js +1 -1
- package/lib/exercises/math/functions/exponential/expSimplifiying.js +1 -1
- package/lib/exercises/math/functions/integral/integralExpU.js +1 -1
- package/lib/exercises/math/functions/integral/integralFractions.js +1 -1
- package/lib/exercises/math/functions/logarithm/log10Simplifying.js +1 -1
- package/lib/exercises/math/functions/logarithm/logEquation.js +1 -1
- package/lib/exercises/math/functions/logarithm/logSimplifiying.js +2 -2
- package/lib/exercises/math/functions/parity/parityFromAlgebra.js +3 -3
- package/lib/exercises/math/functions/parity/parityFromGraph.js +3 -3
- package/lib/exercises/math/functions/rationalFraction/rationalFractionForbiddenValue.js +1 -1
- package/lib/exercises/math/functions/trinoms/alphaBetaFromDevForm.js +2 -2
- package/lib/exercises/math/functions/trinoms/alphaBetaInCanonicalForm.js +2 -2
- package/lib/exercises/math/functions/trinoms/canonicalFromDevForm.js +1 -1
- package/lib/exercises/math/functions/trinoms/deltaTrinom.js +1 -1
- package/lib/exercises/math/functions/trinoms/extremumFromCanonicalForm.js +1 -1
- package/lib/exercises/math/functions/trinoms/extremumTypeFromAlgebricForm.js +2 -2
- package/lib/exercises/math/functions/trinoms/factorizedFormFromRoots.js +1 -1
- package/lib/exercises/math/functions/trinoms/niceRootsFromDevForm.js +1 -1
- package/lib/exercises/math/functions/trinoms/rootsFromDevForm.js +1 -1
- package/lib/exercises/math/functions/trinoms/rootsFromFactorizedForm.js +1 -1
- package/lib/exercises/math/functions/trinoms/solveSecondDegreeEquationByFactorisation.js +1 -1
- package/lib/exercises/math/functions/trinoms/variationsFromAlgebricForm.js +2 -2
- package/lib/exercises/math/geometry/areas/circleArea.js +2 -2
- package/lib/exercises/math/geometry/areas/rectangleArea.js +1 -1
- package/lib/exercises/math/geometry/areas/rightTriangleArea.js +1 -1
- package/lib/exercises/math/geometry/areas/squareArea.js +1 -1
- package/lib/exercises/math/geometry/areas/triangleArea.js +1 -1
- package/lib/exercises/math/geometry/areas/triangleAreaV2.js +1 -1
- package/lib/exercises/math/geometry/cartesian/drawAlineInGGB.js +1 -1
- package/lib/exercises/math/geometry/cartesian/index.d.ts +4 -0
- package/lib/exercises/math/geometry/cartesian/index.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/index.js +4 -0
- package/lib/exercises/math/geometry/cartesian/midpoint.js +1 -1
- package/lib/exercises/math/geometry/cartesian/placeAPoint.js +1 -1
- package/lib/exercises/math/geometry/cartesian/placeAbscissOnLine.d.ts +13 -0
- package/lib/exercises/math/geometry/cartesian/placeAbscissOnLine.d.ts.map +1 -0
- package/lib/exercises/math/geometry/cartesian/placeAbscissOnLine.js +133 -0
- package/lib/exercises/math/geometry/cartesian/placeAbscissOnSemiLine.d.ts +13 -0
- package/lib/exercises/math/geometry/cartesian/placeAbscissOnSemiLine.d.ts.map +1 -0
- package/lib/exercises/math/geometry/cartesian/placeAbscissOnSemiLine.js +132 -0
- package/lib/exercises/math/geometry/cartesian/pointCoordinatesNoOrthonorm.js +1 -1
- package/lib/exercises/math/geometry/cartesian/readAbscissOnLine.d.ts +13 -0
- package/lib/exercises/math/geometry/cartesian/readAbscissOnLine.d.ts.map +1 -0
- package/lib/exercises/math/geometry/cartesian/readAbscissOnLine.js +152 -0
- package/lib/exercises/math/geometry/cartesian/readAbscissOnSemiLine.d.ts +13 -0
- package/lib/exercises/math/geometry/cartesian/readAbscissOnSemiLine.d.ts.map +1 -0
- package/lib/exercises/math/geometry/cartesian/readAbscissOnSemiLine.js +153 -0
- package/lib/exercises/math/geometry/convexity/convexityQuadrinomialsGeo.js +1 -1
- package/lib/exercises/math/geometry/convexity/convexityTrinomialsGeo.js +1 -1
- package/lib/exercises/math/geometry/perimeters/circleCircumference.js +2 -2
- package/lib/exercises/math/geometry/perimeters/rectanglePerimeter.js +1 -1
- package/lib/exercises/math/geometry/perimeters/squarePerimeter.js +1 -1
- package/lib/exercises/math/geometry/perimeters/trianglePerimeter.js +1 -1
- package/lib/exercises/math/geometry/pythagore/pythagoreCalcul.js +2 -2
- package/lib/exercises/math/geometry/thales/thales.js +1 -1
- package/lib/exercises/math/geometry/thales/thalesCalcul.js +2 -2
- package/lib/exercises/math/geometry/vectors/alignementViaColinearity.js +2 -2
- package/lib/exercises/math/geometry/vectors/chasles.js +2 -2
- package/lib/exercises/math/geometry/vectors/colinearity.js +2 -2
- package/lib/exercises/math/geometry/vectors/determinant.js +1 -1
- package/lib/exercises/math/geometry/vectors/equalCaracteristicFromGraph.js +2 -2
- package/lib/exercises/math/geometry/vectors/fourthParallelogramPoint.js +1 -1
- package/lib/exercises/math/geometry/vectors/paralellismViaColinearity.js +2 -2
- package/lib/exercises/math/geometry/vectors/parallelogramViaEqualVectors.js +2 -2
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductOrthoInSquare.js +1 -1
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductViaCoords.js +1 -1
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductViaCos.js +1 -1
- package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithSquareOrRectBase.js +1 -1
- package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleBase.js +1 -1
- package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleRectBase.js +1 -1
- package/lib/exercises/math/limits/limitReading.js +1 -1
- package/lib/exercises/math/limits/polynomLimit.js +2 -2
- package/lib/exercises/math/limits/polynomLimitNoFI.js +2 -2
- package/lib/exercises/math/limits/rationalFracForbiddenValueLimit.js +1 -1
- package/lib/exercises/math/limits/rationalFracLimit.js +2 -2
- package/lib/exercises/math/limits/sequencePolynomLimit.js +1 -1
- package/lib/exercises/math/limits/sequencePolynomNoFILimit.js +1 -1
- package/lib/exercises/math/limits/sequencePolynomProductLimit.js +1 -1
- package/lib/exercises/math/limits/sequenceRationalFracLimit.js +1 -1
- package/lib/exercises/math/percent/applyPercent.js +2 -2
- package/lib/exercises/math/percent/averageEvolutionRate.js +1 -1
- package/lib/exercises/math/percent/cmToEvolution.js +1 -1
- package/lib/exercises/math/percent/evolutionRateFromValues.d.ts +8 -0
- package/lib/exercises/math/percent/evolutionRateFromValues.d.ts.map +1 -0
- package/lib/exercises/math/percent/evolutionRateFromValues.js +71 -0
- package/lib/exercises/math/percent/findStartValueAfterEvolution.d.ts +8 -0
- package/lib/exercises/math/percent/findStartValueAfterEvolution.d.ts.map +1 -0
- package/lib/exercises/math/percent/findStartValueAfterEvolution.js +65 -0
- package/lib/exercises/math/percent/findTVA.js +2 -2
- package/lib/exercises/math/percent/globalPercent.js +1 -1
- package/lib/exercises/math/percent/htToTTC.js +2 -2
- package/lib/exercises/math/percent/index.d.ts +4 -0
- package/lib/exercises/math/percent/index.d.ts.map +1 -1
- package/lib/exercises/math/percent/index.js +4 -0
- package/lib/exercises/math/percent/isTableProportional.js +1 -1
- package/lib/exercises/math/percent/percentToDecimal.d.ts.map +1 -1
- package/lib/exercises/math/percent/percentToDecimal.js +70 -27
- package/lib/exercises/math/percent/populationEffectifFromSubPopulation.d.ts +9 -0
- package/lib/exercises/math/percent/populationEffectifFromSubPopulation.d.ts.map +1 -0
- package/lib/exercises/math/percent/populationEffectifFromSubPopulation.js +93 -0
- package/lib/exercises/math/percent/reciprocalPercentage.js +2 -2
- package/lib/exercises/math/percent/subPopulationEffectifFromPercent.d.ts +9 -0
- package/lib/exercises/math/percent/subPopulationEffectifFromPercent.d.ts.map +1 -0
- package/lib/exercises/math/percent/subPopulationEffectifFromPercent.js +85 -0
- package/lib/exercises/math/percent/ttcToHT.js +2 -2
- package/lib/exercises/math/powers/decimalToScientific.js +1 -1
- package/lib/exercises/math/powers/powersDivision.js +1 -1
- package/lib/exercises/math/powers/powersOfTenToDecimal.js +1 -1
- package/lib/exercises/math/powers/powersProduct.js +1 -1
- package/lib/exercises/math/primitive/constantPrimitive.js +1 -1
- package/lib/exercises/math/primitive/logarithmePrimitive.js +1 -1
- package/lib/exercises/math/primitive/polynomialPrimitive.js +1 -1
- package/lib/exercises/math/primitive/sinCosPrimitive.js +2 -2
- package/lib/exercises/math/primitive/sinUCosUPrimitive.js +2 -2
- package/lib/exercises/math/probaStat/cardBasicProbas.js +2 -2
- package/lib/exercises/math/probaStat/conditionalProbability.js +1 -1
- package/lib/exercises/math/probaStat/diceBasicProbas.js +2 -2
- package/lib/exercises/math/probaStat/independancy.js +2 -2
- package/lib/exercises/math/probaStat/issuesCountingForCards.js +3 -3
- package/lib/exercises/math/probaStat/probaFromTableNoContext.js +1 -1
- package/lib/exercises/math/probaStat/probaFromTableWithContext.js +1 -1
- package/lib/exercises/math/probaStat/probabilityTree.js +1 -1
- package/lib/exercises/math/probaStat/stats1var/averageWithTable.js +1 -1
- package/lib/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.js +2 -1
- package/lib/exercises/math/probaStat/stats1var/median.js +1 -1
- package/lib/exercises/math/probaStat/stats1var/quartiles.js +1 -1
- package/lib/exercises/math/probaStat/stats2var/fineAdjustementExercise.js +1 -1
- package/lib/exercises/math/python/pyForLoop1Exercise.js +2 -2
- package/lib/exercises/math/python/pyNestedForLoopExercise.js +1 -1
- package/lib/exercises/math/python/pyWhileLoop1Exercise.js +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticExplicitFormulaUsage.js +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormula.js +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplictFormulaFirstTermRandom.js +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindReason.js +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindReasonRandomRange.js +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindTerm.js +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticFirstTermsSum.js +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticReasonUsage.js +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticRecurrenceFormulaUsage.js +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticThresholdFind.js +1 -1
- package/lib/exercises/math/sequences/arithmetic/firstIntegersSum.js +1 -1
- package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromFirstTerms.js +2 -2
- package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromGraph.js +2 -2
- package/lib/exercises/math/sequences/geometric/geometricExplicitFormulaUsage.js +1 -1
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormula.js +1 -1
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFirstTermRandom.js +1 -1
- package/lib/exercises/math/sequences/geometric/geometricFindReason.js +1 -1
- package/lib/exercises/math/sequences/geometric/geometricFindTerm.js +1 -1
- package/lib/exercises/math/sequences/geometric/geometricFirstTermsGeneralSum.js +1 -1
- package/lib/exercises/math/sequences/geometric/geometricFirstTermsSum.js +1 -1
- package/lib/exercises/math/sequences/geometric/geometricReasonUsage.js +1 -1
- package/lib/exercises/math/sequences/geometric/geometricRecurrenceFormulaUsage.js +1 -1
- package/lib/exercises/math/sequences/sequencePlot.js +1 -1
- package/lib/exercises/math/sets/intervals/inequalityToInterval.js +1 -1
- package/lib/exercises/math/sets/intervals/intervalToInequality.js +1 -1
- package/lib/exercises/math/sets/intervals/intervalsIntersection.js +1 -1
- package/lib/exercises/math/sets/intervals/intervalsUnion.js +1 -1
- package/lib/exercises/math/sets/setBelonging.js +2 -2
- package/lib/exercises/math/squareRoots/simpifySquareRoot.js +1 -1
- package/lib/exercises/math/squareRoots/squareRootEquation.js +1 -1
- package/lib/exercises/math/squareRoots/squareRootIdentities.js +2 -2
- package/lib/exercises/math/squareRoots/squareRootsSum.js +1 -1
- package/lib/exercises/math/trigonometry/arcLength.d.ts +10 -0
- package/lib/exercises/math/trigonometry/arcLength.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/arcLength.js +92 -0
- package/lib/exercises/math/trigonometry/associatePoint.js +1 -1
- package/lib/exercises/math/trigonometry/basicEquationCos.d.ts +7 -0
- package/lib/exercises/math/trigonometry/basicEquationCos.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/basicEquationCos.js +94 -0
- package/lib/exercises/math/trigonometry/basicEquationSin.d.ts +7 -0
- package/lib/exercises/math/trigonometry/basicEquationSin.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/basicEquationSin.js +106 -0
- package/lib/exercises/math/trigonometry/basicTrigoSystemEquation.d.ts +7 -0
- package/lib/exercises/math/trigonometry/basicTrigoSystemEquation.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/basicTrigoSystemEquation.js +85 -0
- package/lib/exercises/math/trigonometry/calculateCosSinAndTan.js +1 -1
- package/lib/exercises/math/trigonometry/degreeToRadians.d.ts +9 -0
- package/lib/exercises/math/trigonometry/degreeToRadians.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/degreeToRadians.js +125 -0
- package/lib/exercises/math/trigonometry/index.d.ts +6 -0
- package/lib/exercises/math/trigonometry/index.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/index.js +6 -0
- package/lib/exercises/math/trigonometry/mainAngleMeasure.d.ts +9 -0
- package/lib/exercises/math/trigonometry/mainAngleMeasure.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/mainAngleMeasure.js +91 -0
- package/lib/exercises/math/trigonometry/mainRemarkableValues.js +2 -2
- package/lib/exercises/math/trigonometry/remarkableValues.js +3 -3
- package/lib/exercises/math/trigonometry/trigonometry.js +1 -1
- package/lib/exercises/math/trigonometry/trigonometryAngleCalcul.js +1 -1
- package/lib/exercises/math/trigonometry/trigonometrySideCalcul.js +1 -1
- package/lib/exercises/pc/calibrationCurveOfSolution.js +2 -2
- package/lib/exercises/pc/chemicalElements/atomicStructureOfNucleus.js +1 -1
- package/lib/exercises/pc/chemicalElements/calculateProtonsNumberFromMass.js +2 -2
- package/lib/exercises/pc/chemicalElements/findAtomEntitiesNumberFromMass.js +1 -1
- package/lib/exercises/pc/chemicalElements/findAtomicStructureElement.js +1 -1
- package/lib/exercises/pc/chemicalElements/findValenceElectronsNumberFromElectronicConfiguration.js +1 -1
- package/lib/exercises/pc/chemicalElements/findValenceElectronsNumberFromTable.js +1 -1
- package/lib/exercises/pc/chemicalElements/identifyRightElectronicConfiguration.js +1 -1
- package/lib/exercises/pc/chemicalElements/massOrVolumeProportion.js +2 -2
- package/lib/exercises/pc/chemicalEquations.js +1 -1
- package/lib/exercises/pc/chemicalReactions/calculateCombustionEnergy.js +1 -1
- package/lib/exercises/pc/chemicalReactions/identifyStoichiometricMixture.js +1 -1
- package/lib/exercises/pc/chemicalReactions/stoichiometricReaction.js +1 -1
- package/lib/exercises/pc/chemicalReactions/titrationEquivalenceRelation.js +1 -1
- package/lib/exercises/pc/chemicalReactionsProduct.js +1 -1
- package/lib/exercises/pc/delution.js +1 -1
- package/lib/exercises/pc/dosage/beerLambertRandomValue.js +1 -1
- package/lib/exercises/pc/electricity/calculateIntensityInSerieOrParallel.js +1 -1
- package/lib/exercises/pc/electricity/calculateVoltage.js +1 -1
- package/lib/exercises/pc/electricity/electricEnergyFromPower.js +1 -1
- package/lib/exercises/pc/electricity/electricPowerOrEnergyCalculation.js +2 -2
- package/lib/exercises/pc/electricity/kirchhoffVoltageLaw.js +1 -1
- package/lib/exercises/pc/electricity/ohmicConductorOrGenerator.js +1 -1
- package/lib/exercises/pc/energy/kineticEnergyOrMassOrSpeed.js +2 -2
- package/lib/exercises/pc/fluids/mariotte.js +1 -1
- package/lib/exercises/pc/forces/calculateNormalOrFrictionForce.js +1 -1
- package/lib/exercises/pc/forces/forceWork.js +1 -1
- package/lib/exercises/pc/forces/massWeight.js +1 -1
- package/lib/exercises/pc/forces/pressingForce.js +1 -1
- package/lib/exercises/pc/formulaFromComposition.js +1 -1
- package/lib/exercises/pc/identifyAtomicMassOrAtomicNb.js +2 -2
- package/lib/exercises/pc/kineticEnergy.js +1 -1
- package/lib/exercises/pc/math/isolateVariables.js +1 -1
- package/lib/exercises/pc/math/proportionnalityCoeffFromLine.js +1 -1
- package/lib/exercises/pc/molarQuantity.js +1 -1
- package/lib/exercises/pc/mole/molarMass.js +1 -1
- package/lib/exercises/pc/mole/moleculeCountFromMassAndAvogadro.js +1 -1
- package/lib/exercises/pc/moleculeFormula.js +1 -1
- package/lib/exercises/pc/moleculeNomenclature.js +1 -1
- package/lib/exercises/pc/motion/averageSpeed.d.ts.map +1 -1
- package/lib/exercises/pc/motion/characteristicsOfVelocityVector.js +1 -1
- package/lib/exercises/pc/motion/motionReference.js +1 -1
- package/lib/exercises/pc/motion/typeOfAcceleration.js +1 -1
- package/lib/exercises/pc/motion/typeOfMovement.js +1 -1
- package/lib/exercises/pc/pH.js +1 -1
- package/lib/exercises/pc/perceivedFrequency.js +1 -1
- package/lib/exercises/pc/potentialEnergy.js +1 -1
- package/lib/exercises/pc/recognizeRefractionOrReflectionAngles.js +1 -1
- package/lib/exercises/pc/snellDescartes.js +1 -1
- package/lib/exercises/pc/sound/findPeriodFromGraph.js +1 -1
- package/lib/exercises/pc/sound/findPeriodOrFrequencyFromGraph.js +1 -1
- package/lib/exercises/pc/sound/frequencyComparison.js +1 -1
- package/lib/exercises/pc/waves/lightDistanceConversion.js +1 -1
- package/lib/exercises/pc/waves/periodicWaveCelerity.js +1 -1
- package/lib/exercises/pc/weight/weightOnTheMoon.js +1 -1
- package/lib/exercises/utils/getDistinctQuestions.d.ts +1 -1
- package/lib/exercises/utils/getDistinctQuestions.d.ts.map +1 -1
- package/lib/exercises/utils/getDistinctQuestions.js +11 -5
- package/lib/geogebra/colors.js +1 -1
- package/lib/geogebra/geogebraConstructor.js +1 -1
- package/lib/geogebra/parsers/ggbPointToCoords.d.ts +5 -0
- package/lib/geogebra/parsers/ggbPointToCoords.d.ts.map +1 -0
- package/lib/geogebra/parsers/ggbPointToCoords.js +12 -0
- package/lib/geogebra/parsers/parseGGBPoints.d.ts +2 -0
- package/lib/geogebra/parsers/parseGGBPoints.d.ts.map +1 -0
- package/lib/geogebra/parsers/parseGGBPoints.js +10 -0
- package/lib/index.d.ts +61 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/math/geometry/line.d.ts.map +1 -1
- package/lib/math/geometry/line.js +0 -1
- package/lib/math/inequations/inequation.js +1 -1
- package/lib/math/numbers/decimals/decimal.d.ts +1 -0
- package/lib/math/numbers/decimals/decimal.d.ts.map +1 -1
- package/lib/math/numbers/decimals/decimal.js +10 -0
- package/lib/math/numbers/integer/integer.d.ts +2 -0
- package/lib/math/numbers/integer/integer.d.ts.map +1 -1
- package/lib/math/numbers/integer/integer.js +10 -1
- package/lib/math/numbers/nombre.js +1 -1
- package/lib/math/numbers/rationals/rational.js +3 -3
- package/lib/math/numbers/reals/real.js +2 -2
- package/lib/math/polynomials/polynomial.js +1 -1
- package/lib/math/polynomials/trinom.js +1 -1
- package/lib/math/sequences/geometricSequence.d.ts +2 -2
- package/lib/math/sequences/geometricSequence.d.ts.map +1 -1
- package/lib/math/sequences/geometricSequence.js +13 -11
- package/lib/math/sets/discreteSet.d.ts +2 -2
- package/lib/math/sets/discreteSet.d.ts.map +1 -1
- package/lib/math/sets/discreteSet.js +4 -4
- package/lib/math/sets/intervals/intervals.js +1 -1
- package/lib/math/trigonometry/remarkableValue.js +1 -1
- package/lib/math/trigonometry/remarkableValues.d.ts +3 -0
- package/lib/math/trigonometry/remarkableValues.d.ts.map +1 -1
- package/lib/math/trigonometry/remarkableValues.js +72 -1
- package/lib/math/utils/random/randTupleInt.js +1 -1
- package/lib/playground.d.ts.map +1 -1
- package/lib/playground.js +1 -10
- package/lib/tree/nodes/equations/multiEqualNode.js +2 -2
- package/lib/tree/nodes/geometry/degree.d.ts.map +1 -1
- package/lib/tree/nodes/geometry/degree.js +3 -2
- package/lib/tree/nodes/geometry/pointNode.js +1 -1
- package/lib/tree/nodes/inequations/inequationNode.js +1 -1
- package/lib/tree/nodes/operators/addNode.js +3 -3
- package/lib/tree/nodes/operators/divideNode.js +1 -1
- package/lib/tree/nodes/operators/multiplyNode.js +3 -3
- package/lib/tree/nodes/operators/substractNode.js +1 -1
- package/lib/tree/nodes/sets/discreteSetNode.d.ts +1 -0
- package/lib/tree/nodes/sets/discreteSetNode.d.ts.map +1 -1
- package/lib/tree/nodes/sets/discreteSetNode.js +8 -2
- package/lib/tree/nodes/sets/intervalNode.js +1 -1
- package/lib/tree/nodes/sets/unionIntervalNode.js +2 -2
- package/lib/tree/parsers/euroParser.d.ts +2 -0
- package/lib/tree/parsers/euroParser.d.ts.map +1 -0
- package/lib/tree/parsers/euroParser.js +12 -0
- package/lib/tree/parsers/percentParser.d.ts +1 -0
- package/lib/tree/parsers/percentParser.d.ts.map +1 -1
- package/lib/tree/parsers/percentParser.js +11 -0
- package/lib/utils/alea/coinFlip.d.ts +2 -0
- package/lib/utils/alea/coinFlip.d.ts.map +1 -0
- package/lib/utils/alea/coinFlip.js +7 -0
- package/lib/utils/alea/diceFlip.d.ts +2 -0
- package/lib/utils/alea/diceFlip.d.ts.map +1 -0
- package/lib/utils/alea/diceFlip.js +8 -0
- package/lib/utils/alea/probaFlip.d.ts +7 -0
- package/lib/utils/alea/probaFlip.d.ts.map +1 -0
- package/lib/utils/alea/probaFlip.js +12 -0
- package/lib/utils/alea/probaLawFlip.d.ts +7 -0
- package/lib/utils/alea/probaLawFlip.d.ts.map +1 -0
- package/lib/utils/alea/probaLawFlip.js +24 -0
- package/lib/utils/alea/random.d.ts +2 -0
- package/lib/utils/alea/random.d.ts.map +1 -0
- package/lib/utils/alea/random.js +7 -0
- package/lib/utils/alea/randomEnumValue.d.ts +2 -0
- package/lib/utils/alea/randomEnumValue.d.ts.map +1 -0
- package/lib/utils/alea/randomEnumValue.js +9 -0
- package/lib/utils/alea/shuffle.d.ts +2 -0
- package/lib/utils/alea/shuffle.d.ts.map +1 -0
- package/lib/utils/alea/shuffle.js +15 -0
- package/lib/utils/arrays/arrayEqual.d.ts +2 -0
- package/lib/utils/arrays/arrayEqual.d.ts.map +1 -0
- package/lib/utils/arrays/arrayEqual.js +13 -0
- package/lib/utils/arrays/arrayHasSameElement.d.ts +2 -0
- package/lib/utils/arrays/arrayHasSameElement.d.ts.map +1 -0
- package/lib/utils/arrays/arrayHasSameElement.js +8 -0
- package/lib/utils/arrays/cartesianProducts.d.ts +13 -0
- package/lib/utils/arrays/cartesianProducts.d.ts.map +1 -0
- package/lib/utils/arrays/cartesianProducts.js +64 -0
- package/lib/utils/arrays/enumToArray.d.ts +8 -0
- package/lib/utils/arrays/enumToArray.d.ts.map +1 -0
- package/lib/utils/arrays/enumToArray.js +16 -0
- package/lib/utils/arrays/permutations.d.ts +2 -0
- package/lib/utils/arrays/permutations.d.ts.map +1 -0
- package/lib/utils/arrays/permutations.js +21 -0
- package/lib/utils/latex/alignTex.d.ts +1 -1
- package/lib/utils/latex/alignTex.d.ts.map +1 -1
- package/lib/utils/latex/alignTex.js +3 -3
- package/lib/utils/strings/frenchNumbers.d.ts +6 -0
- package/lib/utils/strings/frenchNumbers.d.ts.map +1 -0
- package/lib/utils/strings/frenchNumbers.js +50 -0
- package/lib/utils/strings/numberToFrenchWord.d.ts +2 -0
- package/lib/utils/strings/numberToFrenchWord.d.ts.map +1 -0
- package/lib/utils/strings/numberToFrenchWord.js +81 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Nombre } from
|
|
2
|
-
import { MathSetInterface } from
|
|
1
|
+
import { Nombre } from "../numbers/nombre";
|
|
2
|
+
import { MathSetInterface } from "./mathSetInterface";
|
|
3
3
|
export declare class DiscreteSet implements MathSetInterface {
|
|
4
4
|
elements: Nombre[];
|
|
5
5
|
tex: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discreteSet.d.ts","sourceRoot":"","sources":["../../../src/math/sets/discreteSet.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,qBAAa,WAAY,YAAW,gBAAgB;IAClD,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;gBACA,QAAQ,EAAE,MAAM,EAAE;IAW9B,KAAK,IAAI,MAAM;IAIf,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;
|
|
1
|
+
{"version":3,"file":"discreteSet.d.ts","sourceRoot":"","sources":["../../../src/math/sets/discreteSet.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,qBAAa,WAAY,YAAW,gBAAgB;IAClD,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;gBACA,QAAQ,EAAE,MAAM,EAAE;IAW9B,KAAK,IAAI,MAAM;IAIf,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;IAM7B,gBAAgB,IAAI,MAAM;CAG3B"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DiscreteSet = void 0;
|
|
4
|
-
const random_1 = require("../../utils/random");
|
|
4
|
+
const random_1 = require("../../utils/alea/random");
|
|
5
5
|
class DiscreteSet {
|
|
6
6
|
constructor(elements) {
|
|
7
7
|
this.elements = Array.from(new Set(elements));
|
|
8
|
-
let tex =
|
|
8
|
+
let tex = "\\{";
|
|
9
9
|
this.elements.forEach((el, index) => {
|
|
10
10
|
tex += el.tex;
|
|
11
11
|
if (index < this.elements.length - 1)
|
|
12
|
-
tex +=
|
|
12
|
+
tex += ";";
|
|
13
13
|
else
|
|
14
|
-
tex +=
|
|
14
|
+
tex += "\\}";
|
|
15
15
|
});
|
|
16
16
|
this.tex = tex;
|
|
17
17
|
}
|
|
@@ -6,7 +6,7 @@ const infiniteNode_1 = require("../../../tree/nodes/numbers/infiniteNode");
|
|
|
6
6
|
const closure_1 = require("../../../tree/nodes/sets/closure");
|
|
7
7
|
const discreteSetNode_1 = require("../../../tree/nodes/sets/discreteSetNode");
|
|
8
8
|
const intervalNode_1 = require("../../../tree/nodes/sets/intervalNode");
|
|
9
|
-
const coinFlip_1 = require("../../../utils/coinFlip");
|
|
9
|
+
const coinFlip_1 = require("../../../utils/alea/coinFlip");
|
|
10
10
|
const mathSet_1 = require("../mathSet");
|
|
11
11
|
class IntervalConstructor {
|
|
12
12
|
static random() {
|
|
@@ -5,7 +5,7 @@ const numberNode_1 = require("../../tree/nodes/numbers/numberNode");
|
|
|
5
5
|
const piNode_1 = require("../../tree/nodes/numbers/piNode");
|
|
6
6
|
const addNode_1 = require("../../tree/nodes/operators/addNode");
|
|
7
7
|
const multiplyNode_1 = require("../../tree/nodes/operators/multiplyNode");
|
|
8
|
-
const random_1 = require("../../utils/random");
|
|
8
|
+
const random_1 = require("../../utils/alea/random");
|
|
9
9
|
const randint_1 = require("../utils/random/randint");
|
|
10
10
|
const remarkableValues_1 = require("./remarkableValues");
|
|
11
11
|
class RemarkableValueConstructor {
|
|
@@ -7,5 +7,8 @@ export interface RemarkableValue {
|
|
|
7
7
|
tan: AlgebraicNode;
|
|
8
8
|
point: string;
|
|
9
9
|
}
|
|
10
|
+
export declare const negativeMainTrigovalues: RemarkableValue[];
|
|
10
11
|
export declare const remarkableTrigoValues: RemarkableValue[];
|
|
12
|
+
export declare const mainTrigoValues: RemarkableValue[];
|
|
13
|
+
export declare const mainPositiveTrigovalues: RemarkableValue[];
|
|
11
14
|
//# sourceMappingURL=remarkableValues.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remarkableValues.d.ts","sourceRoot":"","sources":["../../../src/math/trigonometry/remarkableValues.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAQ/D,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,aAAa,CAAC;IACrB,GAAG,EAAE,aAAa,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,aAAa,CAAC;IACnB,GAAG,EAAE,aAAa,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,qBAAqB,EAAE,eAAe,EA2LlD,CAAC"}
|
|
1
|
+
{"version":3,"file":"remarkableValues.d.ts","sourceRoot":"","sources":["../../../src/math/trigonometry/remarkableValues.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAQ/D,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,aAAa,CAAC;IACrB,GAAG,EAAE,aAAa,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,aAAa,CAAC;IACnB,GAAG,EAAE,aAAa,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,uBAAuB,EAAE,eAAe,EAoGpD,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,eAAe,EA2LlD,CAAC;AAEF,eAAO,MAAM,eAAe,mBAG3B,CAAC;AAEF,eAAO,MAAM,uBAAuB,mBAAoC,CAAC"}
|
|
@@ -1,12 +1,78 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.remarkableTrigoValues = void 0;
|
|
3
|
+
exports.mainPositiveTrigovalues = exports.mainTrigoValues = exports.remarkableTrigoValues = exports.negativeMainTrigovalues = void 0;
|
|
4
4
|
const oppositeNode_1 = require("../../tree/nodes/functions/oppositeNode");
|
|
5
5
|
const sqrtNode_1 = require("../../tree/nodes/functions/sqrtNode");
|
|
6
6
|
const numberNode_1 = require("../../tree/nodes/numbers/numberNode");
|
|
7
7
|
const piNode_1 = require("../../tree/nodes/numbers/piNode");
|
|
8
8
|
const fractionNode_1 = require("../../tree/nodes/operators/fractionNode");
|
|
9
9
|
const multiplyNode_1 = require("../../tree/nodes/operators/multiplyNode");
|
|
10
|
+
exports.negativeMainTrigovalues = [
|
|
11
|
+
{
|
|
12
|
+
angle: new oppositeNode_1.OppositeNode(new fractionNode_1.FractionNode(new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(5), piNode_1.PiNode), new numberNode_1.NumberNode(6))),
|
|
13
|
+
degree: 210,
|
|
14
|
+
cos: new oppositeNode_1.OppositeNode(new fractionNode_1.FractionNode(new sqrtNode_1.SqrtNode(new numberNode_1.NumberNode(3)), new numberNode_1.NumberNode(2))),
|
|
15
|
+
sin: new oppositeNode_1.OppositeNode(new fractionNode_1.FractionNode(new numberNode_1.NumberNode(1), new numberNode_1.NumberNode(2))),
|
|
16
|
+
tan: new fractionNode_1.FractionNode(new numberNode_1.NumberNode(1), new sqrtNode_1.SqrtNode(new numberNode_1.NumberNode(3))),
|
|
17
|
+
point: "H",
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
angle: new oppositeNode_1.OppositeNode(new fractionNode_1.FractionNode(new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(3), piNode_1.PiNode), new numberNode_1.NumberNode(4))),
|
|
21
|
+
degree: 225,
|
|
22
|
+
cos: new oppositeNode_1.OppositeNode(new fractionNode_1.FractionNode(new sqrtNode_1.SqrtNode(new numberNode_1.NumberNode(2)), new numberNode_1.NumberNode(2))),
|
|
23
|
+
sin: new oppositeNode_1.OppositeNode(new fractionNode_1.FractionNode(new sqrtNode_1.SqrtNode(new numberNode_1.NumberNode(2)), new numberNode_1.NumberNode(2))),
|
|
24
|
+
tan: new numberNode_1.NumberNode(1),
|
|
25
|
+
point: "K",
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
angle: new oppositeNode_1.OppositeNode(new fractionNode_1.FractionNode(new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(2), piNode_1.PiNode), new numberNode_1.NumberNode(3))),
|
|
29
|
+
degree: 240,
|
|
30
|
+
cos: new oppositeNode_1.OppositeNode(new fractionNode_1.FractionNode(new numberNode_1.NumberNode(1), new numberNode_1.NumberNode(2))),
|
|
31
|
+
sin: new oppositeNode_1.OppositeNode(new fractionNode_1.FractionNode(new sqrtNode_1.SqrtNode(new numberNode_1.NumberNode(3)), new numberNode_1.NumberNode(2))),
|
|
32
|
+
tan: new sqrtNode_1.SqrtNode(new numberNode_1.NumberNode(3)),
|
|
33
|
+
point: "L",
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
angle: new oppositeNode_1.OppositeNode(new fractionNode_1.FractionNode(piNode_1.PiNode, new numberNode_1.NumberNode(2))),
|
|
37
|
+
degree: 270,
|
|
38
|
+
cos: new numberNode_1.NumberNode(0),
|
|
39
|
+
sin: new numberNode_1.NumberNode(-1),
|
|
40
|
+
tan: new numberNode_1.NumberNode(Infinity),
|
|
41
|
+
point: "M",
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
angle: new oppositeNode_1.OppositeNode(new fractionNode_1.FractionNode(piNode_1.PiNode, new numberNode_1.NumberNode(3))),
|
|
45
|
+
degree: 300,
|
|
46
|
+
cos: new fractionNode_1.FractionNode(new numberNode_1.NumberNode(1), new numberNode_1.NumberNode(2)),
|
|
47
|
+
sin: new oppositeNode_1.OppositeNode(new fractionNode_1.FractionNode(new sqrtNode_1.SqrtNode(new numberNode_1.NumberNode(3)), new numberNode_1.NumberNode(2))),
|
|
48
|
+
tan: new oppositeNode_1.OppositeNode(new sqrtNode_1.SqrtNode(new numberNode_1.NumberNode(3))),
|
|
49
|
+
point: "N",
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
angle: new oppositeNode_1.OppositeNode(new fractionNode_1.FractionNode(piNode_1.PiNode, new numberNode_1.NumberNode(4))),
|
|
53
|
+
degree: 315,
|
|
54
|
+
cos: new fractionNode_1.FractionNode(new sqrtNode_1.SqrtNode(new numberNode_1.NumberNode(2)), new numberNode_1.NumberNode(2)),
|
|
55
|
+
sin: new oppositeNode_1.OppositeNode(new fractionNode_1.FractionNode(new sqrtNode_1.SqrtNode(new numberNode_1.NumberNode(2)), new numberNode_1.NumberNode(2))),
|
|
56
|
+
tan: new oppositeNode_1.OppositeNode(new numberNode_1.NumberNode(1)),
|
|
57
|
+
point: "P",
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
angle: new oppositeNode_1.OppositeNode(new fractionNode_1.FractionNode(piNode_1.PiNode, new numberNode_1.NumberNode(6))),
|
|
61
|
+
degree: 330,
|
|
62
|
+
cos: new fractionNode_1.FractionNode(new sqrtNode_1.SqrtNode(new numberNode_1.NumberNode(3)), new numberNode_1.NumberNode(2)),
|
|
63
|
+
sin: new oppositeNode_1.OppositeNode(new fractionNode_1.FractionNode(new numberNode_1.NumberNode(1), new numberNode_1.NumberNode(2))),
|
|
64
|
+
tan: new oppositeNode_1.OppositeNode(new fractionNode_1.FractionNode(new numberNode_1.NumberNode(1), new sqrtNode_1.SqrtNode(new numberNode_1.NumberNode(3)))),
|
|
65
|
+
point: "Q",
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
angle: new numberNode_1.NumberNode(0),
|
|
69
|
+
degree: 0,
|
|
70
|
+
cos: new numberNode_1.NumberNode(1),
|
|
71
|
+
sin: new numberNode_1.NumberNode(0),
|
|
72
|
+
tan: new numberNode_1.NumberNode(0),
|
|
73
|
+
point: "I",
|
|
74
|
+
},
|
|
75
|
+
];
|
|
10
76
|
exports.remarkableTrigoValues = [
|
|
11
77
|
{
|
|
12
78
|
angle: new numberNode_1.NumberNode(0),
|
|
@@ -137,3 +203,8 @@ exports.remarkableTrigoValues = [
|
|
|
137
203
|
point: "Q",
|
|
138
204
|
},
|
|
139
205
|
];
|
|
206
|
+
exports.mainTrigoValues = [
|
|
207
|
+
...exports.negativeMainTrigovalues,
|
|
208
|
+
...exports.remarkableTrigoValues.slice(1).slice(0, 8),
|
|
209
|
+
];
|
|
210
|
+
exports.mainPositiveTrigovalues = exports.remarkableTrigoValues.slice(0, 9);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.distinctRandTupleInt = exports.randTupleInt = void 0;
|
|
4
|
-
const arrayEqual_1 = require("../../../utils/arrayEqual");
|
|
4
|
+
const arrayEqual_1 = require("../../../utils/arrays/arrayEqual");
|
|
5
5
|
const randint_1 = require("./randint");
|
|
6
6
|
/**
|
|
7
7
|
* @param size tuple length
|
package/lib/playground.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"playground.d.ts","sourceRoot":"","sources":["../src/playground.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"playground.d.ts","sourceRoot":"","sources":["../src/playground.ts"],"names":[],"mappings":"AA4BA,eAAO,MAAM,UAAU,YAEtB,CAAC"}
|
package/lib/playground.js
CHANGED
|
@@ -2,15 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.playground = void 0;
|
|
4
4
|
const playground = () => {
|
|
5
|
-
//
|
|
6
|
-
// const affine2 = new Affine(2, 3);
|
|
7
|
-
// const tree = affine1.toTree({ toTexOptions: { color: "green" } });
|
|
8
|
-
// console.log(tree.opts);
|
|
9
|
-
// console.log(tree.toTex());
|
|
10
|
-
// const node = new MultiplyNode(
|
|
11
|
-
// affine1.toTree({ toTexOptions: { color: "green" } }),
|
|
12
|
-
// new (coinFlip() ? SubstractNode : AddNode)(affine2.toTree(), (1).toTree()),
|
|
13
|
-
// ).toTex();
|
|
14
|
-
// console.log(node);
|
|
5
|
+
// console.log(mainTrigoValues.map((e) => e.angle.toTex()));
|
|
15
6
|
};
|
|
16
7
|
exports.playground = playground;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.MultiEqualNode = void 0;
|
|
4
4
|
const node_1 = require("../node");
|
|
5
|
-
const permutations_1 = require("../../../utils/permutations");
|
|
6
|
-
const cartesianProducts_1 = require("../../../utils/cartesianProducts");
|
|
5
|
+
const permutations_1 = require("../../../utils/arrays/permutations");
|
|
6
|
+
const cartesianProducts_1 = require("../../../utils/arrays/cartesianProducts");
|
|
7
7
|
class MultiEqualNode {
|
|
8
8
|
constructor(children, opts) {
|
|
9
9
|
this.children = children;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"degree.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/geometry/degree.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,wBAAgB,YAAY,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,IAAI,UAAU,CAErD;AAED,qBAAa,UAAW,YAAW,aAAa;IAC9C,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,QAAQ,CAAmB;IACjC,SAAS,EAAE,OAAO,CAAC;gBACP,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM;IAO5D,aAAa;;;;IAMb,YAAY,IAAI,MAAM;IAGtB,KAAK,IAAI,MAAM;IAGf,QAAQ;IAGR,cAAc;
|
|
1
|
+
{"version":3,"file":"degree.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/geometry/degree.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,wBAAgB,YAAY,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,IAAI,UAAU,CAErD;AAED,qBAAa,UAAW,YAAW,aAAa;IAC9C,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,QAAQ,CAAmB;IACjC,SAAS,EAAE,OAAO,CAAC;gBACP,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM;IAO5D,aAAa;;;;IAMb,YAAY,IAAI,MAAM;IAGtB,KAAK,IAAI,MAAM;IAGf,QAAQ;IAGR,cAAc;IAQd,iBAAiB;IAGjB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAGrC,QAAQ;IAGR,MAAM,CAAC,IAAI,EAAE,aAAa;CAG3B"}
|
|
@@ -11,8 +11,8 @@ class DegreeNode {
|
|
|
11
11
|
this.type = node_1.NodeType.number;
|
|
12
12
|
this.value = value;
|
|
13
13
|
this.tex =
|
|
14
|
-
(tex?.replace(".", ",") || (value + "").replace(".", ",")) +
|
|
15
|
-
this.mathString = mathString || this.value + "^\\circ";
|
|
14
|
+
(tex?.replace(".", ",") || (value + "").replace(".", ",")) + `^{\\circ}`;
|
|
15
|
+
this.mathString = mathString || this.value + "^\\{\\circ\\}";
|
|
16
16
|
this.isNumeric = true;
|
|
17
17
|
}
|
|
18
18
|
toIdentifiers() {
|
|
@@ -33,6 +33,7 @@ class DegreeNode {
|
|
|
33
33
|
toAllValidTexs() {
|
|
34
34
|
const res = [];
|
|
35
35
|
res.push(this.tex);
|
|
36
|
+
res.push(this.value.frenchify());
|
|
36
37
|
//!est-ce vraiment nécessaire sachant que les inputs students n'auront en théorie jamais de "."
|
|
37
38
|
if (this.tex.includes(","))
|
|
38
39
|
res.push(this.tex.replace(",", "."));
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PointNode = void 0;
|
|
4
4
|
const point_1 = require("../../../math/geometry/point");
|
|
5
|
-
const cartesianProducts_1 = require("../../../utils/cartesianProducts");
|
|
5
|
+
const cartesianProducts_1 = require("../../../utils/arrays/cartesianProducts");
|
|
6
6
|
const node_1 = require("../node");
|
|
7
7
|
class PointNode {
|
|
8
8
|
constructor(point, opts) {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.InequationNode = void 0;
|
|
4
4
|
const inequation_1 = require("../../../math/inequations/inequation");
|
|
5
|
-
const cartesianProducts_1 = require("../../../utils/cartesianProducts");
|
|
5
|
+
const cartesianProducts_1 = require("../../../utils/arrays/cartesianProducts");
|
|
6
6
|
const isLetter_1 = require("../../../utils/strings/isLetter");
|
|
7
7
|
const node_1 = require("../node");
|
|
8
8
|
const infiniteNode_1 = require("../numbers/infiniteNode");
|
|
@@ -4,9 +4,9 @@ exports.AddNode = exports.isAddNode = void 0;
|
|
|
4
4
|
// import { add } from "mathjs";
|
|
5
5
|
const node_1 = require("../node");
|
|
6
6
|
const operatorNode_1 = require("./operatorNode");
|
|
7
|
-
const coinFlip_1 = require("../../../utils/coinFlip");
|
|
8
|
-
const permutations_1 = require("../../../utils/permutations");
|
|
9
|
-
const cartesianProducts_1 = require("../../../utils/cartesianProducts");
|
|
7
|
+
const coinFlip_1 = require("../../../utils/alea/coinFlip");
|
|
8
|
+
const permutations_1 = require("../../../utils/arrays/permutations");
|
|
9
|
+
const cartesianProducts_1 = require("../../../utils/arrays/cartesianProducts");
|
|
10
10
|
const operatorComposition_1 = require("../../../tree/utilities/operatorComposition");
|
|
11
11
|
const substractNode_1 = require("./substractNode");
|
|
12
12
|
const oppositeNode_1 = require("../functions/oppositeNode");
|
|
@@ -4,7 +4,7 @@ exports.DivideNode = exports.isDivideNode = void 0;
|
|
|
4
4
|
// import { divide } from "mathjs";
|
|
5
5
|
const node_1 = require("../node");
|
|
6
6
|
const operatorNode_1 = require("./operatorNode");
|
|
7
|
-
const coinFlip_1 = require("../../../utils/coinFlip");
|
|
7
|
+
const coinFlip_1 = require("../../../utils/alea/coinFlip");
|
|
8
8
|
function isDivideNode(a) {
|
|
9
9
|
return (0, operatorNode_1.isOperatorNode)(a) && a.id === operatorNode_1.OperatorIds.divide;
|
|
10
10
|
}
|
|
@@ -4,9 +4,9 @@ exports.MultiplyNode = exports.sortMultiplyNodes = exports.isMultiplyNode = void
|
|
|
4
4
|
// import { multiply } from "mathjs";
|
|
5
5
|
const node_1 = require("../node");
|
|
6
6
|
const operatorNode_1 = require("./operatorNode");
|
|
7
|
-
const coinFlip_1 = require("../../../utils/coinFlip");
|
|
8
|
-
const permutations_1 = require("../../../utils/permutations");
|
|
9
|
-
const cartesianProducts_1 = require("../../../utils/cartesianProducts");
|
|
7
|
+
const coinFlip_1 = require("../../../utils/alea/coinFlip");
|
|
8
|
+
const permutations_1 = require("../../../utils/arrays/permutations");
|
|
9
|
+
const cartesianProducts_1 = require("../../../utils/arrays/cartesianProducts");
|
|
10
10
|
const operatorComposition_1 = require("../../../tree/utilities/operatorComposition");
|
|
11
11
|
const powerNode_1 = require("./powerNode");
|
|
12
12
|
const numberNode_1 = require("../numbers/numberNode");
|
|
@@ -6,7 +6,7 @@ const node_1 = require("../node");
|
|
|
6
6
|
const operatorNode_1 = require("./operatorNode");
|
|
7
7
|
const oppositeNode_1 = require("../functions/oppositeNode");
|
|
8
8
|
const addNode_1 = require("./addNode");
|
|
9
|
-
const coinFlip_1 = require("../../../utils/coinFlip");
|
|
9
|
+
const coinFlip_1 = require("../../../utils/alea/coinFlip");
|
|
10
10
|
const colorize_1 = require("../../../utils/latex/colorize");
|
|
11
11
|
function isSubstractNode(a) {
|
|
12
12
|
return (0, operatorNode_1.isOperatorNode)(a) && a.id === operatorNode_1.OperatorIds.substract;
|
|
@@ -20,6 +20,7 @@ export declare class DiscreteSetNode implements SetNode {
|
|
|
20
20
|
toMathString(): string;
|
|
21
21
|
toMathjs(): string;
|
|
22
22
|
toTex(): string;
|
|
23
|
+
toDeleteRandomElement(): DiscreteSetNode;
|
|
23
24
|
}
|
|
24
25
|
export declare const EmptySet: DiscreteSetNode;
|
|
25
26
|
//# sourceMappingURL=discreteSetNode.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discreteSetNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/sets/discreteSetNode.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,OAAO,EAAa,MAAM,WAAW,CAAC;AACvD,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,IAAI,eAAe,CAE/D;AACD,qBAAa,eAAgB,YAAW,OAAO;IAC7C,IAAI,EAAE,QAAQ,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;IAC/B,QAAQ,EAAE,IAAI,EAAE,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;gBACL,QAAQ,EAAE,IAAI,EAAE,EAAE,IAAI,CAAC,EAAE,WAAW;IAOhD,UAAU;IAGV,cAAc;IAGd,aAAa;;;;;;IAMb,iBAAiB,CAAC,IAAI,CAAC,EAAE,WAAW;IAyBpC,YAAY;IAGZ,QAAQ;IAGR,KAAK;
|
|
1
|
+
{"version":3,"file":"discreteSetNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/sets/discreteSetNode.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,OAAO,EAAa,MAAM,WAAW,CAAC;AACvD,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,IAAI,eAAe,CAE/D;AACD,qBAAa,eAAgB,YAAW,OAAO;IAC7C,IAAI,EAAE,QAAQ,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;IAC/B,QAAQ,EAAE,IAAI,EAAE,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;gBACL,QAAQ,EAAE,IAAI,EAAE,EAAE,IAAI,CAAC,EAAE,WAAW;IAOhD,UAAU;IAGV,cAAc;IAGd,aAAa;;;;;;IAMb,iBAAiB,CAAC,IAAI,CAAC,EAAE,WAAW;IAyBpC,YAAY;IAGZ,QAAQ;IAGR,KAAK;IAOL,qBAAqB;CAMtB;AAED,eAAO,MAAM,QAAQ,iBAA0B,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.EmptySet = exports.DiscreteSetNode = exports.isDiscreteSetNode = void 0;
|
|
4
|
-
const cartesianProducts_1 = require("../../../utils/cartesianProducts");
|
|
5
|
-
const permutations_1 = require("../../../utils/permutations");
|
|
4
|
+
const cartesianProducts_1 = require("../../../utils/arrays/cartesianProducts");
|
|
5
|
+
const permutations_1 = require("../../../utils/arrays/permutations");
|
|
6
6
|
const node_1 = require("../node");
|
|
7
7
|
const setNode_1 = require("./setNode");
|
|
8
8
|
function isDiscreteSetNode(a) {
|
|
@@ -65,6 +65,12 @@ class DiscreteSetNode {
|
|
|
65
65
|
.map((el) => el.toTex())
|
|
66
66
|
.join(";")}\\right\\}`;
|
|
67
67
|
}
|
|
68
|
+
toDeleteRandomElement() {
|
|
69
|
+
const index = Math.floor(Math.random() * this.elements.length);
|
|
70
|
+
const newElements = [...this.elements];
|
|
71
|
+
newElements.splice(index, 1);
|
|
72
|
+
return new DiscreteSetNode(newElements);
|
|
73
|
+
}
|
|
68
74
|
}
|
|
69
75
|
exports.DiscreteSetNode = DiscreteSetNode;
|
|
70
76
|
exports.EmptySet = new DiscreteSetNode([]);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.IntervalNode = exports.isIntervalNode = void 0;
|
|
4
|
-
const cartesianProducts_1 = require("../../../utils/cartesianProducts");
|
|
4
|
+
const cartesianProducts_1 = require("../../../utils/arrays/cartesianProducts");
|
|
5
5
|
const inequationNode_1 = require("../inequations/inequationNode");
|
|
6
6
|
const node_1 = require("../node");
|
|
7
7
|
const constantNode_1 = require("../numbers/constantNode");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.UnionIntervalNode = exports.UnionIntervalNodeBuilder = exports.isUnionIntervalNode = void 0;
|
|
4
|
-
const cartesianProducts_1 = require("../../../utils/cartesianProducts");
|
|
5
|
-
const permutations_1 = require("../../../utils/permutations");
|
|
4
|
+
const cartesianProducts_1 = require("../../../utils/arrays/cartesianProducts");
|
|
5
|
+
const permutations_1 = require("../../../utils/arrays/permutations");
|
|
6
6
|
const node_1 = require("../node");
|
|
7
7
|
const infiniteNode_1 = require("../numbers/infiniteNode");
|
|
8
8
|
const closure_1 = require("./closure");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"euroParser.d.ts","sourceRoot":"","sources":["../../../src/tree/parsers/euroParser.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,QAAS,MAAM,8CAKrC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.euroParser = void 0;
|
|
4
|
+
const euroParser = (ans, allowNoEuroSign = true) => {
|
|
5
|
+
if (!allowNoEuroSign && !ans.includes("€"))
|
|
6
|
+
return false;
|
|
7
|
+
const nb = ans.replace("€", "").unfrenchify();
|
|
8
|
+
if (isNaN(nb))
|
|
9
|
+
return false;
|
|
10
|
+
return nb.frenchify() + "€";
|
|
11
|
+
};
|
|
12
|
+
exports.euroParser = euroParser;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"percentParser.d.ts","sourceRoot":"","sources":["../../../src/tree/parsers/percentParser.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"percentParser.d.ts","sourceRoot":"","sources":["../../../src/tree/parsers/percentParser.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,QAAS,MAAM,iDAKxC,CAAC"}
|
|
@@ -1 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.percentParser = void 0;
|
|
4
|
+
const percentParser = (ans, allowNoPercentSign = true) => {
|
|
5
|
+
if (!allowNoPercentSign && !ans.includes("\\%"))
|
|
6
|
+
return false;
|
|
7
|
+
const nb = ans.replace("\\%", "").unfrenchify();
|
|
8
|
+
if (isNaN(nb))
|
|
9
|
+
return false;
|
|
10
|
+
return nb.frenchify() + "\\%";
|
|
11
|
+
};
|
|
12
|
+
exports.percentParser = percentParser;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coinFlip.d.ts","sourceRoot":"","sources":["../../../src/utils/alea/coinFlip.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,QAAO,OAE3B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diceFlip.d.ts","sourceRoot":"","sources":["../../../src/utils/alea/diceFlip.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,QAAQ,UAAW,MAAM,WAErC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.diceFlip = void 0;
|
|
4
|
+
const randint_1 = require("../../math/utils/random/randint");
|
|
5
|
+
const diceFlip = (faces) => {
|
|
6
|
+
return (0, randint_1.randint)(1, faces + 1);
|
|
7
|
+
};
|
|
8
|
+
exports.diceFlip = diceFlip;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"probaFlip.d.ts","sourceRoot":"","sources":["../../../src/utils/alea/probaFlip.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,SAAS,MAAO,MAAM,YAElC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* @param n
|
|
5
|
+
* @returns true iff random < n
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.probaFlip = void 0;
|
|
9
|
+
const probaFlip = (n) => {
|
|
10
|
+
return Math.random() < n;
|
|
11
|
+
};
|
|
12
|
+
exports.probaFlip = probaFlip;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"probaLawFlip.d.ts","sourceRoot":"","sources":["../../../src/utils/alea/probaLawFlip.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,YAAY,8BAaxB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* @param arr [T, proba]
|
|
5
|
+
* @returns element T_i with proba p_i
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.probaLawFlip = void 0;
|
|
9
|
+
const probaLawFlip = (arr) => {
|
|
10
|
+
if (Math.abs(arr.reduce((acc, curr) => (acc += curr[1]), 0) - 1) > 0.1)
|
|
11
|
+
throw Error("proba law does not add up t 1");
|
|
12
|
+
const rand = Math.random();
|
|
13
|
+
const sorted = [...arr].sort((a, b) => b[1] - a[1]);
|
|
14
|
+
let probaAcc = 0;
|
|
15
|
+
let i = 0;
|
|
16
|
+
while (i < arr.length - 1) {
|
|
17
|
+
probaAcc += sorted[i][1];
|
|
18
|
+
if (rand < probaAcc)
|
|
19
|
+
return arr[i][0];
|
|
20
|
+
i++;
|
|
21
|
+
}
|
|
22
|
+
return arr[arr.length - 1][0];
|
|
23
|
+
};
|
|
24
|
+
exports.probaLawFlip = probaLawFlip;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"random.d.ts","sourceRoot":"","sources":["../../../src/utils/alea/random.ts"],"names":[],"mappings":"AAAA,wBAAgB,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAEnC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"randomEnumValue.d.ts","sourceRoot":"","sources":["../../../src/utils/alea/randomEnumValue.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,MAAO,GAAG,QAGrC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.randomEnumValue = void 0;
|
|
4
|
+
const randint_1 = require("../../math/utils/random/randint");
|
|
5
|
+
const randomEnumValue = (e) => {
|
|
6
|
+
const randIndex = (0, randint_1.randint)(0, Object.keys(e).length / 2);
|
|
7
|
+
return e[randIndex];
|
|
8
|
+
};
|
|
9
|
+
exports.randomEnumValue = randomEnumValue;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shuffle.d.ts","sourceRoot":"","sources":["../../../src/utils/alea/shuffle.ts"],"names":[],"mappings":"AACA,wBAAgB,OAAO,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,CAS1C"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.shuffle = void 0;
|
|
4
|
+
/* Randomize array in-place using Durstenfeld shuffle algorithm */
|
|
5
|
+
function shuffle(array) {
|
|
6
|
+
const res = [...array];
|
|
7
|
+
for (var i = res.length - 1; i > 0; i--) {
|
|
8
|
+
var j = Math.floor(Math.random() * (i + 1));
|
|
9
|
+
var temp = res[i];
|
|
10
|
+
res[i] = res[j];
|
|
11
|
+
res[j] = temp;
|
|
12
|
+
}
|
|
13
|
+
return res;
|
|
14
|
+
}
|
|
15
|
+
exports.shuffle = shuffle;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arrayEqual.d.ts","sourceRoot":"","sources":["../../../src/utils/arrays/arrayEqual.ts"],"names":[],"mappings":"AAAA,wBAAgB,UAAU,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,OAAO,CAM3D"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.arrayEqual = void 0;
|
|
4
|
+
function arrayEqual(arr1, arr2) {
|
|
5
|
+
if (arr1.length !== arr2.length)
|
|
6
|
+
return false;
|
|
7
|
+
for (let i = 0; i < arr1.length; i++) {
|
|
8
|
+
if (arr1[i] !== arr2[i])
|
|
9
|
+
return false;
|
|
10
|
+
}
|
|
11
|
+
return true;
|
|
12
|
+
}
|
|
13
|
+
exports.arrayEqual = arrayEqual;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arrayHasSameElement.d.ts","sourceRoot":"","sources":["../../../src/utils/arrays/arrayHasSameElement.ts"],"names":[],"mappings":"AAAA,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,OAAO,CAKrE"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.arrayHasSameElements = void 0;
|
|
4
|
+
function arrayHasSameElements(arr1, arr2) {
|
|
5
|
+
return (arr1.length === arr2.length &&
|
|
6
|
+
arr1.every((element) => arr2.includes(element)));
|
|
7
|
+
}
|
|
8
|
+
exports.arrayHasSameElements = arrayHasSameElements;
|