math-exercises 2.2.3 → 2.2.5
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/math/calcul/digitDecimalRank.js +4 -4
- package/lib/exercises/math/calcul/digitRank.js +4 -4
- package/lib/exercises/math/calcul/digitRankNumber.d.ts +8 -0
- package/lib/exercises/math/calcul/digitRankNumber.d.ts.map +1 -0
- package/lib/exercises/math/calcul/digitRankNumber.js +57 -0
- package/lib/exercises/math/calcul/fractions/fractionAndIntegerDivision.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionAndIntegerDivision.js +34 -0
- package/lib/exercises/math/calcul/fractions/fractionAndIntegerProduct.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionAndIntegerProduct.js +17 -0
- package/lib/exercises/math/calcul/fractions/fractionsDivision.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionsDivision.js +23 -0
- package/lib/exercises/math/calcul/fractions/fractionsProduct.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionsProduct.js +15 -0
- package/lib/exercises/math/calcul/index.d.ts +1 -0
- package/lib/exercises/math/calcul/index.d.ts.map +1 -1
- package/lib/exercises/math/calcul/index.js +1 -0
- package/lib/exercises/math/calcul/proportionality/index.d.ts +2 -0
- package/lib/exercises/math/calcul/proportionality/index.d.ts.map +1 -1
- package/lib/exercises/math/calcul/proportionality/index.js +2 -0
- package/lib/exercises/math/calcul/proportionality/scaleCalculation.d.ts +9 -0
- package/lib/exercises/math/calcul/proportionality/scaleCalculation.d.ts.map +1 -0
- package/lib/exercises/math/calcul/proportionality/scaleCalculation.js +90 -0
- package/lib/exercises/math/calcul/proportionality/scaleUsage.d.ts +9 -0
- package/lib/exercises/math/calcul/proportionality/scaleUsage.d.ts.map +1 -0
- package/lib/exercises/math/calcul/proportionality/scaleUsage.js +95 -0
- package/lib/exercises/math/calcul/rounding/rounding.d.ts.map +1 -1
- package/lib/exercises/math/calcul/rounding/rounding.js +18 -0
- package/lib/exercises/math/calculLitteral/distributivity/allIdentities.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/allIdentities.js +1 -0
- package/lib/exercises/math/calculLitteral/distributivity/canonicalFormDevelopment.d.ts +7 -0
- package/lib/exercises/math/calculLitteral/distributivity/canonicalFormDevelopment.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/distributivity/canonicalFormDevelopment.js +60 -0
- package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivity.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivity.js +31 -1
- package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivityWithCoeff.d.ts +9 -0
- package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivityWithCoeff.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivityWithCoeff.js +86 -0
- package/lib/exercises/math/calculLitteral/distributivity/firstIdentity.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/firstIdentity.js +21 -2
- package/lib/exercises/math/calculLitteral/distributivity/index.d.ts +2 -0
- package/lib/exercises/math/calculLitteral/distributivity/index.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/index.js +2 -0
- package/lib/exercises/math/calculLitteral/distributivity/secondIdentity.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/secondIdentity.js +23 -2
- package/lib/exercises/math/calculLitteral/distributivity/simpleDistributivity.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/simpleDistributivity.js +17 -2
- package/lib/exercises/math/calculLitteral/distributivity/thirdIdentity.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/thirdIdentity.js +21 -2
- package/lib/exercises/math/calculLitteral/equation/equationSimpleSquare.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/equationSimpleSquare.js +26 -1
- package/lib/exercises/math/calculLitteral/equation/equationType1Exercise.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/equationType1Exercise.js +18 -2
- package/lib/exercises/math/calculLitteral/equation/equationType2Exercise.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/equationType2Exercise.js +19 -2
- package/lib/exercises/math/calculLitteral/equation/equationType3Exercise.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/equationType3Exercise.js +15 -2
- package/lib/exercises/math/calculLitteral/equation/equationType4Exercise.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/equationType4Exercise.js +20 -5
- package/lib/exercises/math/calculLitteral/equation/firstDegreeEquation.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/firstDegreeEquation.js +24 -1
- package/lib/exercises/math/calculLitteral/equation/firstDegreeEquationIntType1.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/firstDegreeEquationIntType1.js +20 -1
- package/lib/exercises/math/calculLitteral/equation/firstDegreeEquationIntType2.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/firstDegreeEquationIntType2.js +19 -3
- package/lib/exercises/math/calculLitteral/equation/fractionEquation.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/fractionEquation.js +24 -8
- package/lib/exercises/math/calculLitteral/equation/multiplicationEquation.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/multiplicationEquation.js +21 -2
- package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq1.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq1.js +24 -4
- package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq2.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq2.js +25 -5
- package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq3.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq3.js +19 -0
- package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.js +1 -0
- package/lib/exercises/math/calculLitteral/factorisation/factorizeCanonicalForm.d.ts +8 -0
- package/lib/exercises/math/calculLitteral/factorisation/factorizeCanonicalForm.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/factorisation/factorizeCanonicalForm.js +77 -0
- package/lib/exercises/math/calculLitteral/factorisation/factorizeCanonicalFormWithSqrt.d.ts +8 -0
- package/lib/exercises/math/calculLitteral/factorisation/factorizeCanonicalFormWithSqrt.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/factorisation/factorizeCanonicalFormWithSqrt.js +80 -0
- package/lib/exercises/math/calculLitteral/factorisation/index.d.ts +2 -0
- package/lib/exercises/math/calculLitteral/factorisation/index.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/index.js +2 -0
- package/lib/exercises/math/conversion/lengthConversion.d.ts.map +1 -1
- package/lib/exercises/math/conversion/lengthConversion.js +18 -4
- package/lib/exercises/math/equaDiff/equaDiffGeneralForme.d.ts.map +1 -1
- package/lib/exercises/math/equaDiff/equaDiffGeneralForme.js +1 -0
- package/lib/exercises/math/functions/affines/affineExpressionFromTwoImages.d.ts +10 -0
- package/lib/exercises/math/functions/affines/affineExpressionFromTwoImages.d.ts.map +1 -0
- package/lib/exercises/math/functions/affines/affineExpressionFromTwoImages.js +81 -0
- package/lib/exercises/math/functions/affines/index.d.ts +1 -0
- package/lib/exercises/math/functions/affines/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/index.js +1 -0
- package/lib/exercises/math/functions/logarithm/log10PowerSimplifying.d.ts.map +1 -1
- package/lib/exercises/math/functions/logarithm/log10PowerSimplifying.js +12 -2
- package/lib/exercises/math/functions/trinoms/index.d.ts +2 -0
- package/lib/exercises/math/functions/trinoms/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/index.js +2 -0
- package/lib/exercises/math/functions/trinoms/solveEquationByFactorisation.d.ts +5 -0
- package/lib/exercises/math/functions/trinoms/solveEquationByFactorisation.d.ts.map +1 -0
- package/lib/exercises/math/functions/trinoms/solveEquationByFactorisation.js +44 -0
- package/lib/exercises/math/functions/trinoms/solveSecondDegreeEquationByFactorisation.d.ts +9 -0
- package/lib/exercises/math/functions/trinoms/solveSecondDegreeEquationByFactorisation.d.ts.map +1 -0
- package/lib/exercises/math/functions/trinoms/solveSecondDegreeEquationByFactorisation.js +134 -0
- package/lib/exercises/math/functions/trinoms/solveSecondDegreeEquationFromCano.d.ts +7 -0
- package/lib/exercises/math/functions/trinoms/solveSecondDegreeEquationFromCano.d.ts.map +1 -0
- package/lib/exercises/math/functions/trinoms/solveSecondDegreeEquationFromCano.js +59 -0
- package/lib/exercises/math/geometry/vectors/scalarProductViaCoords.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/scalarProductViaCoords.js +1 -0
- package/lib/exercises/math/index.d.ts +1 -0
- package/lib/exercises/math/index.d.ts.map +1 -1
- package/lib/exercises/math/index.js +1 -0
- package/lib/exercises/math/percent/applyPercent.d.ts.map +1 -1
- package/lib/exercises/math/percent/applyPercent.js +20 -2
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindRandomTermFromTwoTerms.d.ts +11 -0
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindRandomTermFromTwoTerms.d.ts.map +1 -0
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindRandomTermFromTwoTerms.js +49 -0
- package/lib/exercises/math/sequences/arithmetic/index.d.ts +1 -0
- package/lib/exercises/math/sequences/arithmetic/index.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/index.js +1 -0
- package/lib/exercises/math/spaceGeometry/index.d.ts +2 -0
- package/lib/exercises/math/spaceGeometry/index.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/index.js +17 -0
- package/lib/exercises/math/spaceGeometry/vectors/index.d.ts +4 -0
- package/lib/exercises/math/spaceGeometry/vectors/index.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/vectors/index.js +19 -0
- package/lib/exercises/math/spaceGeometry/vectors/spaceVectorCoordinatesFromPoints.d.ts +5 -0
- package/lib/exercises/math/spaceGeometry/vectors/spaceVectorCoordinatesFromPoints.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/vectors/spaceVectorCoordinatesFromPoints.js +52 -0
- package/lib/exercises/math/spaceGeometry/vectors/spaceVectorLinearCombinationCoords.d.ts +5 -0
- package/lib/exercises/math/spaceGeometry/vectors/spaceVectorLinearCombinationCoords.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/vectors/spaceVectorLinearCombinationCoords.js +62 -0
- package/lib/exercises/math/spaceGeometry/vectors/spaceVectorNormCalculation.d.ts +9 -0
- package/lib/exercises/math/spaceGeometry/vectors/spaceVectorNormCalculation.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/vectors/spaceVectorNormCalculation.js +54 -0
- package/lib/exercises/math/squareRoots/squareRootIdentities.js +3 -3
- package/lib/exercises/math/suites/sequencePlot.d.ts.map +1 -1
- package/lib/exercises/math/suites/sequencePlot.js +1 -2
- package/lib/exercises/math/trigonometry/trigonometrySideCalcul.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/trigonometrySideCalcul.js +1 -0
- package/lib/exercises/pc/calibrationCurveOfSolution.d.ts.map +1 -1
- package/lib/exercises/pc/calibrationCurveOfSolution.js +2 -1
- package/lib/exercises/pc/chemicalElements/atomicStructureOfNucleus.d.ts +1 -1
- package/lib/exercises/pc/chemicalElements/atomicStructureOfNucleus.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalElements/atomicStructureOfNucleus.js +1 -1
- package/lib/exercises/pc/chemicalElements/calculateProtonsNumberFromMass.d.ts +1 -1
- package/lib/exercises/pc/chemicalElements/calculateProtonsNumberFromMass.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalElements/calculateProtonsNumberFromMass.js +3 -3
- package/lib/exercises/pc/chemicalElements/calculateVolumetricMass.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalElements/calculateVolumetricMass.js +29 -4
- package/lib/exercises/pc/chemicalElements/findAtomEntitiesNumberFromMass.d.ts +1 -1
- package/lib/exercises/pc/chemicalElements/findAtomEntitiesNumberFromMass.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalElements/findAtomEntitiesNumberFromMass.js +6 -6
- package/lib/exercises/pc/chemicalElements/findAtomicStructureElement.d.ts +1 -1
- package/lib/exercises/pc/chemicalElements/findAtomicStructureElement.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalElements/findAtomicStructureElement.js +2 -1
- package/lib/exercises/pc/chemicalElements/findValenceElectronsNumberFromElectronicConfiguration.d.ts +1 -1
- package/lib/exercises/pc/chemicalElements/findValenceElectronsNumberFromElectronicConfiguration.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalElements/findValenceElectronsNumberFromElectronicConfiguration.js +1 -1
- package/lib/exercises/pc/chemicalElements/findValenceElectronsNumberFromTable.d.ts +1 -1
- package/lib/exercises/pc/chemicalElements/findValenceElectronsNumberFromTable.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalElements/findValenceElectronsNumberFromTable.js +1 -1
- package/lib/exercises/pc/chemicalElements/identifyRightElectronicConfiguration.d.ts +1 -1
- package/lib/exercises/pc/chemicalElements/identifyRightElectronicConfiguration.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalElements/identifyRightElectronicConfiguration.js +1 -1
- package/lib/exercises/pc/chemicalElements/index.d.ts +1 -0
- package/lib/exercises/pc/chemicalElements/index.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalElements/index.js +1 -0
- package/lib/exercises/pc/chemicalElements/massOrVolumeProportion.d.ts +11 -0
- package/lib/exercises/pc/chemicalElements/massOrVolumeProportion.d.ts.map +1 -0
- package/lib/exercises/pc/chemicalElements/massOrVolumeProportion.js +100 -0
- package/lib/exercises/pc/chemicalEquations.d.ts +1 -1
- package/lib/exercises/pc/chemicalEquations.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalEquations.js +1 -1
- package/lib/exercises/pc/chemicalReactions/calculateSynthesisEfficiency.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalReactions/calculateSynthesisEfficiency.js +1 -0
- package/lib/exercises/pc/chemicalReactions/index.d.ts +2 -0
- package/lib/exercises/pc/chemicalReactions/index.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalReactions/index.js +2 -0
- package/lib/exercises/pc/chemicalReactions/stoichiometricReaction.d.ts +5 -0
- package/lib/exercises/pc/chemicalReactions/stoichiometricReaction.d.ts.map +1 -0
- package/lib/exercises/pc/chemicalReactions/stoichiometricReaction.js +69 -0
- package/lib/exercises/pc/chemicalReactions/titrationEquivalenceRelation.d.ts +11 -0
- package/lib/exercises/pc/chemicalReactions/titrationEquivalenceRelation.d.ts.map +1 -0
- package/lib/exercises/pc/chemicalReactions/titrationEquivalenceRelation.js +181 -0
- package/lib/exercises/pc/chemicalReactionsProduct.d.ts +1 -1
- package/lib/exercises/pc/chemicalReactionsProduct.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalReactionsProduct.js +1 -1
- package/lib/exercises/pc/dosage/beerLambertRandomValue.d.ts.map +1 -1
- package/lib/exercises/pc/dosage/beerLambertRandomValue.js +2 -1
- package/lib/exercises/pc/dosage/concentrationCalculation.d.ts +10 -0
- package/lib/exercises/pc/dosage/concentrationCalculation.d.ts.map +1 -0
- package/lib/exercises/pc/dosage/concentrationCalculation.js +119 -0
- package/lib/exercises/pc/dosage/concentrationFromMassCalculation.d.ts +10 -0
- package/lib/exercises/pc/dosage/concentrationFromMassCalculation.d.ts.map +1 -0
- package/lib/exercises/pc/dosage/concentrationFromMassCalculation.js +117 -0
- package/lib/exercises/pc/dosage/index.d.ts +2 -0
- package/lib/exercises/pc/dosage/index.d.ts.map +1 -1
- package/lib/exercises/pc/dosage/index.js +2 -0
- package/lib/exercises/pc/electricity/calculateIntensity.d.ts +8 -0
- package/lib/exercises/pc/electricity/calculateIntensity.d.ts.map +1 -0
- package/lib/exercises/pc/electricity/calculateIntensity.js +60 -0
- package/lib/exercises/pc/electricity/calculateIntensityInSerieOrParallel.d.ts +10 -0
- package/lib/exercises/pc/electricity/calculateIntensityInSerieOrParallel.d.ts.map +1 -0
- package/lib/exercises/pc/electricity/calculateIntensityInSerieOrParallel.js +105 -0
- package/lib/exercises/pc/electricity/calculateVoltage.d.ts +11 -0
- package/lib/exercises/pc/electricity/calculateVoltage.d.ts.map +1 -0
- package/lib/exercises/pc/electricity/calculateVoltage.js +144 -0
- package/lib/exercises/pc/electricity/electricPowerOrEnergyCalculation.d.ts +9 -0
- package/lib/exercises/pc/electricity/electricPowerOrEnergyCalculation.d.ts.map +1 -0
- package/lib/exercises/pc/electricity/electricPowerOrEnergyCalculation.js +81 -0
- package/lib/exercises/pc/electricity/index.d.ts +7 -0
- package/lib/exercises/pc/electricity/index.d.ts.map +1 -1
- package/lib/exercises/pc/electricity/index.js +7 -0
- package/lib/exercises/pc/electricity/kirchhoffVoltageLaw.d.ts +10 -0
- package/lib/exercises/pc/electricity/kirchhoffVoltageLaw.d.ts.map +1 -0
- package/lib/exercises/pc/electricity/kirchhoffVoltageLaw.js +110 -0
- package/lib/exercises/pc/electricity/ohmLaw.d.ts +11 -0
- package/lib/exercises/pc/electricity/ohmLaw.d.ts.map +1 -0
- package/lib/exercises/pc/electricity/ohmLaw.js +123 -0
- package/lib/exercises/pc/electricity/ohmicConductorOrGenerator.d.ts +5 -0
- package/lib/exercises/pc/electricity/ohmicConductorOrGenerator.d.ts.map +1 -0
- package/lib/exercises/pc/electricity/ohmicConductorOrGenerator.js +95 -0
- package/lib/exercises/pc/energy/calorificValue.d.ts +8 -0
- package/lib/exercises/pc/energy/calorificValue.d.ts.map +1 -0
- package/lib/exercises/pc/energy/calorificValue.js +78 -0
- package/lib/exercises/pc/energy/combustionTransferEnergy.d.ts +8 -0
- package/lib/exercises/pc/energy/combustionTransferEnergy.d.ts.map +1 -0
- package/lib/exercises/pc/energy/combustionTransferEnergy.js +78 -0
- package/lib/exercises/pc/energy/combustionTransferEnergy2.d.ts +11 -0
- package/lib/exercises/pc/energy/combustionTransferEnergy2.d.ts.map +1 -0
- package/lib/exercises/pc/energy/combustionTransferEnergy2.js +141 -0
- package/lib/exercises/pc/energy/efficencyOfConverter.d.ts +8 -0
- package/lib/exercises/pc/energy/efficencyOfConverter.d.ts.map +1 -0
- package/lib/exercises/pc/energy/efficencyOfConverter.js +84 -0
- package/lib/exercises/pc/energy/efficiencyCalculation.d.ts +10 -0
- package/lib/exercises/pc/energy/efficiencyCalculation.d.ts.map +1 -0
- package/lib/exercises/pc/energy/efficiencyCalculation.js +122 -0
- package/lib/exercises/pc/energy/energyTransfer.d.ts +10 -0
- package/lib/exercises/pc/energy/energyTransfer.d.ts.map +1 -0
- package/lib/exercises/pc/energy/energyTransfer.js +67 -0
- package/lib/exercises/pc/energy/index.d.ts +9 -0
- package/lib/exercises/pc/energy/index.d.ts.map +1 -0
- package/lib/exercises/pc/energy/index.js +24 -0
- package/lib/exercises/pc/energy/kineticEnergyOrMassOrSpeed.d.ts +10 -0
- package/lib/exercises/pc/energy/kineticEnergyOrMassOrSpeed.d.ts.map +1 -0
- package/lib/exercises/pc/energy/kineticEnergyOrMassOrSpeed.js +168 -0
- package/lib/exercises/pc/energy/thermalEnergyTransferCalculation.d.ts +11 -0
- package/lib/exercises/pc/energy/thermalEnergyTransferCalculation.d.ts.map +1 -0
- package/lib/exercises/pc/energy/thermalEnergyTransferCalculation.js +143 -0
- package/lib/exercises/pc/forces/calculateNormalOrFrictionForce.d.ts +8 -0
- package/lib/exercises/pc/forces/calculateNormalOrFrictionForce.d.ts.map +1 -0
- package/lib/exercises/pc/forces/calculateNormalOrFrictionForce.js +102 -0
- package/lib/exercises/pc/forces/electroStaticForce.d.ts +13 -0
- package/lib/exercises/pc/forces/electroStaticForce.d.ts.map +1 -0
- package/lib/exercises/pc/forces/electroStaticForce.js +117 -0
- package/lib/exercises/pc/forces/gravitationalAttractionObjectHeight.d.ts +9 -0
- package/lib/exercises/pc/forces/gravitationalAttractionObjectHeight.d.ts.map +1 -0
- package/lib/exercises/pc/forces/gravitationalAttractionObjectHeight.js +132 -0
- package/lib/exercises/pc/forces/gravitationalAttractionValue.d.ts +1 -0
- package/lib/exercises/pc/forces/gravitationalAttractionValue.d.ts.map +1 -1
- package/lib/exercises/pc/forces/gravitationalAttractionValue.js +31 -27
- package/lib/exercises/pc/forces/gravitationalForcePlanets.d.ts +10 -0
- package/lib/exercises/pc/forces/gravitationalForcePlanets.d.ts.map +1 -0
- package/lib/exercises/pc/forces/gravitationalForcePlanets.js +118 -0
- package/lib/exercises/pc/forces/index.d.ts +5 -0
- package/lib/exercises/pc/forces/index.d.ts.map +1 -1
- package/lib/exercises/pc/forces/index.js +6 -0
- package/lib/exercises/pc/forces/massWeight.d.ts +9 -0
- package/lib/exercises/pc/forces/massWeight.d.ts.map +1 -0
- package/lib/exercises/pc/forces/massWeight.js +68 -0
- package/lib/exercises/pc/forces/pressureDifferenceCalculation.d.ts +1 -0
- package/lib/exercises/pc/forces/pressureDifferenceCalculation.d.ts.map +1 -0
- package/lib/exercises/pc/forces/pressureDifferenceCalculation.js +106 -0
- package/lib/exercises/pc/formulaFromComposition.js +2 -2
- package/lib/exercises/pc/identifyAtomicMassOrAtomicNb.d.ts +8 -0
- package/lib/exercises/pc/identifyAtomicMassOrAtomicNb.d.ts.map +1 -0
- package/lib/exercises/pc/identifyAtomicMassOrAtomicNb.js +72 -0
- package/lib/exercises/pc/index.d.ts +6 -0
- package/lib/exercises/pc/index.d.ts.map +1 -1
- package/lib/exercises/pc/index.js +6 -0
- package/lib/exercises/pc/molarQuantity.js +2 -2
- package/lib/exercises/pc/mole/index.d.ts +2 -0
- package/lib/exercises/pc/mole/index.d.ts.map +1 -1
- package/lib/exercises/pc/mole/index.js +2 -0
- package/lib/exercises/pc/mole/molarMass.js +1 -1
- package/lib/exercises/pc/mole/moleculeCountFromMassAndAvogadro.d.ts +9 -0
- package/lib/exercises/pc/mole/moleculeCountFromMassAndAvogadro.d.ts.map +1 -0
- package/lib/exercises/pc/mole/moleculeCountFromMassAndAvogadro.js +75 -0
- package/lib/exercises/pc/mole/moleculeCountFromMol.d.ts +7 -0
- package/lib/exercises/pc/mole/moleculeCountFromMol.d.ts.map +1 -0
- package/lib/exercises/pc/mole/moleculeCountFromMol.js +66 -0
- package/lib/exercises/pc/moleculeFormula.js +1 -1
- package/lib/exercises/pc/moleculeNomenclature.js +1 -1
- package/lib/exercises/pc/motion/averageSpeed.d.ts +12 -0
- package/lib/exercises/pc/motion/averageSpeed.d.ts.map +1 -0
- package/lib/exercises/pc/motion/averageSpeed.js +122 -0
- package/lib/exercises/pc/motion/averageSpeedCalculation.d.ts +10 -0
- package/lib/exercises/pc/motion/averageSpeedCalculation.d.ts.map +1 -0
- package/lib/exercises/pc/motion/averageSpeedCalculation.js +146 -0
- package/lib/exercises/pc/motion/characteristicsOfVelocityVector.d.ts +7 -0
- package/lib/exercises/pc/motion/characteristicsOfVelocityVector.d.ts.map +1 -0
- package/lib/exercises/pc/motion/characteristicsOfVelocityVector.js +86 -0
- package/lib/exercises/pc/motion/index.d.ts +7 -0
- package/lib/exercises/pc/motion/index.d.ts.map +1 -0
- package/lib/exercises/pc/motion/index.js +22 -0
- package/lib/exercises/pc/motion/motionReference.d.ts +9 -0
- package/lib/exercises/pc/motion/motionReference.d.ts.map +1 -0
- package/lib/exercises/pc/motion/motionReference.js +168 -0
- package/lib/exercises/pc/motion/typeOfAcceleration.d.ts +5 -0
- package/lib/exercises/pc/motion/typeOfAcceleration.d.ts.map +1 -0
- package/lib/exercises/pc/motion/typeOfAcceleration.js +97 -0
- package/lib/exercises/pc/motion/typeOfMovement.d.ts +5 -0
- package/lib/exercises/pc/motion/typeOfMovement.d.ts.map +1 -0
- package/lib/exercises/pc/motion/typeOfMovement.js +111 -0
- package/lib/exercises/pc/orderOfMagnitude.d.ts +8 -0
- package/lib/exercises/pc/orderOfMagnitude.d.ts.map +1 -0
- package/lib/exercises/pc/orderOfMagnitude.js +68 -0
- package/lib/exercises/pc/pH.d.ts.map +1 -1
- package/lib/exercises/pc/pH.js +1 -0
- package/lib/exercises/pc/potentialEnergy.d.ts.map +1 -1
- package/lib/exercises/pc/potentialEnergy.js +17 -5
- package/lib/exercises/pc/power/calculatePowerOfLight.d.ts +8 -0
- package/lib/exercises/pc/power/calculatePowerOfLight.d.ts.map +1 -0
- package/lib/exercises/pc/power/calculatePowerOfLight.js +86 -0
- package/lib/exercises/pc/power/index.d.ts +2 -0
- package/lib/exercises/pc/power/index.d.ts.map +1 -0
- package/lib/exercises/pc/power/index.js +17 -0
- package/lib/exercises/pc/recognizeRefractionOrReflectionAngles.d.ts +5 -0
- package/lib/exercises/pc/recognizeRefractionOrReflectionAngles.d.ts.map +1 -0
- package/lib/exercises/pc/recognizeRefractionOrReflectionAngles.js +117 -0
- package/lib/exercises/pc/sound/findPeriodOrFrequencyFromGraph.d.ts +9 -0
- package/lib/exercises/pc/sound/findPeriodOrFrequencyFromGraph.d.ts.map +1 -0
- package/lib/exercises/pc/sound/findPeriodOrFrequencyFromGraph.js +95 -0
- package/lib/exercises/pc/sound/index.d.ts +1 -0
- package/lib/exercises/pc/sound/index.d.ts.map +1 -1
- package/lib/exercises/pc/sound/index.js +1 -0
- package/lib/exercises/pc/spectral/spectralEnergy.d.ts.map +1 -1
- package/lib/exercises/pc/spectral/spectralEnergy.js +1 -0
- package/lib/exercises/pc/waves/index.d.ts +1 -0
- package/lib/exercises/pc/waves/index.d.ts.map +1 -1
- package/lib/exercises/pc/waves/index.js +1 -0
- package/lib/exercises/pc/waves/lightDistanceConversion.d.ts +10 -0
- package/lib/exercises/pc/waves/lightDistanceConversion.d.ts.map +1 -0
- package/lib/exercises/pc/waves/lightDistanceConversion.js +161 -0
- package/lib/exercises/pc/waves/periodicWaveCelerity.d.ts.map +1 -1
- package/lib/exercises/pc/waves/periodicWaveCelerity.js +1 -0
- package/lib/exercises/pc/weight/calculateWeight.d.ts +7 -0
- package/lib/exercises/pc/weight/calculateWeight.d.ts.map +1 -0
- package/lib/exercises/pc/weight/calculateWeight.js +73 -0
- package/lib/exercises/pc/weight/index.d.ts +1 -0
- package/lib/exercises/pc/weight/index.d.ts.map +1 -1
- package/lib/exercises/pc/weight/index.js +1 -0
- package/lib/exercises/pc/weight/weightOnTheMoon.d.ts.map +1 -1
- package/lib/exercises/pc/weight/weightOnTheMoon.js +7 -6
- package/lib/exercises/utils/getAtoms.d.ts +1 -1
- package/lib/exercises/utils/getAtoms.d.ts.map +1 -1
- package/lib/exercises/utils/getAtoms.js +1 -1
- package/lib/index.d.ts +216 -75
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +4 -0
- package/lib/math/geometry/spacePoint.d.ts +27 -0
- package/lib/math/geometry/spacePoint.d.ts.map +1 -0
- package/lib/math/geometry/spacePoint.js +80 -0
- package/lib/math/geometry/spaceVector.d.ts +28 -0
- package/lib/math/geometry/spaceVector.d.ts.map +1 -0
- package/lib/math/geometry/spaceVector.js +83 -0
- 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 +8 -0
- package/lib/math/numbers/rationals/rational.d.ts +1 -0
- package/lib/math/numbers/rationals/rational.d.ts.map +1 -1
- package/lib/math/numbers/rationals/rational.js +4 -0
- package/lib/math/numbers/reals/extendedRingElement.d.ts +1 -2
- package/lib/math/numbers/reals/extendedRingElement.d.ts.map +1 -1
- package/lib/math/polynomials/affine.d.ts +4 -0
- package/lib/math/polynomials/affine.d.ts.map +1 -1
- package/lib/math/polynomials/affine.js +10 -0
- package/lib/math/polynomials/trinom.d.ts +2 -1
- package/lib/math/polynomials/trinom.d.ts.map +1 -1
- package/lib/math/polynomials/trinom.js +3 -0
- package/lib/pc/constants/atoms.d.ts +0 -1
- package/lib/pc/constants/atoms.d.ts.map +1 -1
- package/lib/pc/constants/atoms.js +2 -2
- package/lib/pc/constants/coulomb.d.ts +3 -0
- package/lib/pc/constants/coulomb.d.ts.map +1 -0
- package/lib/pc/constants/coulomb.js +13 -0
- package/lib/pc/constants/earth.d.ts +0 -1
- package/lib/pc/constants/earth.d.ts.map +1 -1
- package/lib/pc/constants/earth.js +4 -4
- package/lib/pc/constants/gravity.d.ts +1 -1
- package/lib/pc/constants/gravity.d.ts.map +1 -1
- package/lib/pc/constants/gravity.js +16 -7
- package/lib/pc/constants/mechanics/gravitational.d.ts +14 -0
- package/lib/pc/constants/mechanics/gravitational.d.ts.map +1 -0
- package/lib/pc/constants/mechanics/gravitational.js +37 -0
- package/lib/pc/constants/mechanics/planets.d.ts +15 -0
- package/lib/pc/constants/mechanics/planets.d.ts.map +1 -0
- package/lib/pc/constants/mechanics/planets.js +35 -0
- package/lib/pc/constants/mechanics/waves.d.ts +8 -0
- package/lib/pc/constants/mechanics/waves.d.ts.map +1 -0
- package/lib/pc/constants/mechanics/waves.js +8 -0
- package/lib/pc/constants/molecularChemistry/atomSymbols.d.ts +2 -0
- package/lib/pc/constants/molecularChemistry/atomSymbols.d.ts.map +1 -0
- package/lib/pc/constants/molecularChemistry/atomSymbols.js +2 -0
- package/lib/pc/constants/molecularChemistry/atome.d.ts +18 -0
- package/lib/pc/constants/molecularChemistry/atome.d.ts.map +1 -0
- package/lib/pc/constants/molecularChemistry/atome.js +174 -0
- package/lib/pc/constants/molecularChemistry/atoms.d.ts +9 -0
- package/lib/pc/constants/molecularChemistry/atoms.d.ts.map +1 -0
- package/lib/pc/constants/molecularChemistry/atoms.js +15 -0
- package/lib/pc/constants/molecularChemistry/molecule.d.ts +25 -0
- package/lib/pc/constants/molecularChemistry/molecule.d.ts.map +1 -0
- package/lib/pc/constants/molecularChemistry/molecule.js +579 -0
- package/lib/pc/constants/molecularChemistry/reaction.d.ts +27 -0
- package/lib/pc/constants/molecularChemistry/reaction.d.ts.map +1 -0
- package/lib/pc/constants/molecularChemistry/reaction.js +471 -0
- package/lib/pc/measure/measure.d.ts +16 -6
- package/lib/pc/measure/measure.d.ts.map +1 -1
- package/lib/pc/measure/measure.js +112 -16
- package/lib/pc/units/AmountOfSubstance.d.ts +17 -0
- package/lib/pc/units/AmountOfSubstance.d.ts.map +1 -0
- package/lib/pc/units/AmountOfSubstance.js +40 -0
- package/lib/pc/units/PressionUnit.d.ts +17 -0
- package/lib/pc/units/PressionUnit.d.ts.map +1 -0
- package/lib/pc/units/PressionUnit.js +32 -0
- package/lib/pc/units/distanceUnits.d.ts +16 -0
- package/lib/pc/units/distanceUnits.d.ts.map +1 -0
- package/lib/pc/units/distanceUnits.js +32 -0
- package/lib/pc/units/divideUnit.d.ts +13 -0
- package/lib/pc/units/divideUnit.d.ts.map +1 -0
- package/lib/pc/units/divideUnit.js +32 -0
- package/lib/pc/units/electricalChargeUnit.d.ts +17 -0
- package/lib/pc/units/electricalChargeUnit.d.ts.map +1 -0
- package/lib/pc/units/electricalChargeUnit.js +40 -0
- package/lib/pc/units/electricalResistanceUnit.d.ts +18 -0
- package/lib/pc/units/electricalResistanceUnit.d.ts.map +1 -0
- package/lib/pc/units/electricalResistanceUnit.js +32 -0
- package/lib/pc/units/electricalUnit.d.ts +18 -0
- package/lib/pc/units/electricalUnit.d.ts.map +1 -0
- package/lib/pc/units/electricalUnit.js +32 -0
- package/lib/pc/units/energyUnit.d.ts +16 -0
- package/lib/pc/units/energyUnit.d.ts.map +1 -0
- package/lib/pc/units/energyUnit.js +32 -0
- package/lib/pc/units/forceUnits.d.ts +16 -0
- package/lib/pc/units/forceUnits.d.ts.map +1 -0
- package/lib/pc/units/forceUnits.js +32 -0
- package/lib/pc/units/frequenceUnit.d.ts +17 -0
- package/lib/pc/units/frequenceUnit.d.ts.map +1 -0
- package/lib/pc/units/frequenceUnit.js +40 -0
- package/lib/pc/units/interfaces/baseTenUnit.d.ts +10 -0
- package/lib/pc/units/interfaces/baseTenUnit.d.ts.map +1 -0
- package/lib/pc/units/interfaces/baseTenUnit.js +16 -0
- package/lib/pc/units/interfaces/basicUnit.d.ts +13 -0
- package/lib/pc/units/interfaces/basicUnit.d.ts.map +1 -0
- package/lib/pc/units/interfaces/basicUnit.js +19 -0
- package/lib/pc/units/interfaces/unit.d.ts +13 -0
- package/lib/pc/units/interfaces/unit.d.ts.map +1 -0
- package/lib/pc/units/interfaces/unit.js +2 -0
- package/lib/pc/units/massUnits.d.ts +17 -0
- package/lib/pc/units/massUnits.d.ts.map +1 -0
- package/lib/pc/units/massUnits.js +32 -0
- package/lib/pc/units/mulitplyUnits.d.ts +13 -0
- package/lib/pc/units/mulitplyUnits.d.ts.map +1 -0
- package/lib/pc/units/mulitplyUnits.js +26 -0
- package/lib/pc/units/powerUnits.d.ts +14 -0
- package/lib/pc/units/powerUnits.d.ts.map +1 -0
- package/lib/pc/units/powerUnits.js +26 -0
- package/lib/pc/units/timeUnits.d.ts +13 -0
- package/lib/pc/units/timeUnits.d.ts.map +1 -0
- package/lib/pc/units/timeUnits.js +42 -0
- package/lib/pc/units/volumeUnit.d.ts +17 -0
- package/lib/pc/units/volumeUnit.d.ts.map +1 -0
- package/lib/pc/units/volumeUnit.js +32 -0
- package/lib/pc/units/wattUnit.d.ts +17 -0
- package/lib/pc/units/wattUnit.d.ts.map +1 -0
- package/lib/pc/units/wattUnit.js +32 -0
- package/lib/playground.d.ts +2 -0
- package/lib/playground.d.ts.map +1 -0
- package/lib/playground.js +19 -0
- package/lib/server.d.ts +3 -0
- package/lib/server.d.ts.map +1 -1
- package/lib/server.js +11 -5
- package/lib/tree/nodes/equations/equationSolutionNode.d.ts.map +1 -1
- package/lib/tree/nodes/equations/equationSolutionNode.js +8 -0
- package/lib/tree/nodes/node.d.ts +4 -0
- package/lib/tree/nodes/node.d.ts.map +1 -1
- package/lib/tree/nodes/operators/addNode.js +2 -2
- package/lib/tree/nodes/operators/multiplyNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/multiplyNode.js +40 -12
- package/lib/tree/nodes/operators/powerNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/powerNode.js +12 -0
- package/lib/utils/alignTex.d.ts +2 -0
- package/lib/utils/alignTex.d.ts.map +1 -0
- package/lib/utils/alignTex.js +18 -0
- package/package.json +1 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Unit } from "./interfaces/unit";
|
|
2
|
+
import { BaseTenUnit } from "./interfaces/baseTenUnit";
|
|
3
|
+
export type forceValues = "kN" | "hN" | "daN" | "N" | "dN" | "cN" | "mN";
|
|
4
|
+
export declare class ForceUnit extends BaseTenUnit<forceValues> {
|
|
5
|
+
static readonly kN: ForceUnit;
|
|
6
|
+
static readonly hN: ForceUnit;
|
|
7
|
+
static readonly daN: ForceUnit;
|
|
8
|
+
static readonly N: ForceUnit;
|
|
9
|
+
static readonly dN: ForceUnit;
|
|
10
|
+
static readonly cN: ForceUnit;
|
|
11
|
+
static readonly mN: ForceUnit;
|
|
12
|
+
className(): string;
|
|
13
|
+
getUnitsValues(): string[];
|
|
14
|
+
getUnitsObjects(): Unit<forceValues>[];
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=forceUnits.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forceUnits.d.ts","sourceRoot":"","sources":["../../../src/pc/units/forceUnits.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,GAAG,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAGzE,qBAAa,SAAU,SAAQ,WAAW,CAAC,WAAW,CAAC;IACrD,MAAM,CAAC,QAAQ,CAAC,EAAE,YAAuB;IACzC,MAAM,CAAC,QAAQ,CAAC,EAAE,YAAuB;IACzC,MAAM,CAAC,QAAQ,CAAC,GAAG,YAAwB;IAC3C,MAAM,CAAC,QAAQ,CAAC,CAAC,YAAsB;IACvC,MAAM,CAAC,QAAQ,CAAC,EAAE,YAAuB;IACzC,MAAM,CAAC,QAAQ,CAAC,EAAE,YAAuB;IACzC,MAAM,CAAC,QAAQ,CAAC,EAAE,YAAuB;IAEzC,SAAS,IAAI,MAAM;IAInB,cAAc,IAAI,MAAM,EAAE;IAG1B,eAAe,IAAI,IAAI,CAAC,WAAW,CAAC,EAAE;CAWvC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ForceUnit = void 0;
|
|
4
|
+
const baseTenUnit_1 = require("./interfaces/baseTenUnit");
|
|
5
|
+
const forces = ["kN", "hN", "daN", "N", "dN", "cN", "mN"];
|
|
6
|
+
class ForceUnit extends baseTenUnit_1.BaseTenUnit {
|
|
7
|
+
className() {
|
|
8
|
+
return "ForceUnit";
|
|
9
|
+
}
|
|
10
|
+
getUnitsValues() {
|
|
11
|
+
return forces;
|
|
12
|
+
}
|
|
13
|
+
getUnitsObjects() {
|
|
14
|
+
return [
|
|
15
|
+
ForceUnit.kN,
|
|
16
|
+
ForceUnit.hN,
|
|
17
|
+
ForceUnit.daN,
|
|
18
|
+
ForceUnit.N,
|
|
19
|
+
ForceUnit.dN,
|
|
20
|
+
ForceUnit.cN,
|
|
21
|
+
ForceUnit.mN,
|
|
22
|
+
];
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.ForceUnit = ForceUnit;
|
|
26
|
+
ForceUnit.kN = new ForceUnit("kN");
|
|
27
|
+
ForceUnit.hN = new ForceUnit("hN");
|
|
28
|
+
ForceUnit.daN = new ForceUnit("daN");
|
|
29
|
+
ForceUnit.N = new ForceUnit("N");
|
|
30
|
+
ForceUnit.dN = new ForceUnit("dN");
|
|
31
|
+
ForceUnit.cN = new ForceUnit("cN");
|
|
32
|
+
ForceUnit.mN = new ForceUnit("mN");
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BaseTenUnit } from "./interfaces/baseTenUnit";
|
|
2
|
+
import { Unit } from "./interfaces/unit";
|
|
3
|
+
type frequenceValues = "kHz" | "hHz" | "daHz" | "Hz" | "dHz" | "cHz" | "mHz";
|
|
4
|
+
export declare class FrequenceUnit extends BaseTenUnit<frequenceValues> {
|
|
5
|
+
static readonly kHz: FrequenceUnit;
|
|
6
|
+
static readonly hHZ: FrequenceUnit;
|
|
7
|
+
static readonly daHz: FrequenceUnit;
|
|
8
|
+
static readonly Hz: FrequenceUnit;
|
|
9
|
+
static readonly dHz: FrequenceUnit;
|
|
10
|
+
static readonly cHz: FrequenceUnit;
|
|
11
|
+
static readonly mHz: FrequenceUnit;
|
|
12
|
+
className(): string;
|
|
13
|
+
getUnitsValues(): string[];
|
|
14
|
+
getUnitsObjects(): Unit<frequenceValues>[];
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=frequenceUnit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frequenceUnit.d.ts","sourceRoot":"","sources":["../../../src/pc/units/frequenceUnit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,KAAK,eAAe,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,GAAG,IAAI,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;AAY7E,qBAAa,aAAc,SAAQ,WAAW,CAAC,eAAe,CAAC;IAC7D,MAAM,CAAC,QAAQ,CAAC,GAAG,gBAA4B;IAC/C,MAAM,CAAC,QAAQ,CAAC,GAAG,gBAA4B;IAC/C,MAAM,CAAC,QAAQ,CAAC,IAAI,gBAA6B;IACjD,MAAM,CAAC,QAAQ,CAAC,EAAE,gBAA2B;IAC7C,MAAM,CAAC,QAAQ,CAAC,GAAG,gBAA4B;IAC/C,MAAM,CAAC,QAAQ,CAAC,GAAG,gBAA4B;IAC/C,MAAM,CAAC,QAAQ,CAAC,GAAG,gBAA4B;IAE/C,SAAS,IAAI,MAAM;IAGnB,cAAc,IAAI,MAAM,EAAE;IAG1B,eAAe,IAAI,IAAI,CAAC,eAAe,CAAC,EAAE;CAW3C"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FrequenceUnit = void 0;
|
|
4
|
+
const baseTenUnit_1 = require("./interfaces/baseTenUnit");
|
|
5
|
+
const hzValues = [
|
|
6
|
+
"kHz",
|
|
7
|
+
"hHz",
|
|
8
|
+
"daHz",
|
|
9
|
+
"Hz",
|
|
10
|
+
"dHz",
|
|
11
|
+
"cHz",
|
|
12
|
+
"mHz",
|
|
13
|
+
];
|
|
14
|
+
class FrequenceUnit extends baseTenUnit_1.BaseTenUnit {
|
|
15
|
+
className() {
|
|
16
|
+
return "PressionUnit";
|
|
17
|
+
}
|
|
18
|
+
getUnitsValues() {
|
|
19
|
+
return hzValues;
|
|
20
|
+
}
|
|
21
|
+
getUnitsObjects() {
|
|
22
|
+
return [
|
|
23
|
+
FrequenceUnit.kHz,
|
|
24
|
+
FrequenceUnit.hHZ,
|
|
25
|
+
FrequenceUnit.daHz,
|
|
26
|
+
FrequenceUnit.Hz,
|
|
27
|
+
FrequenceUnit.dHz,
|
|
28
|
+
FrequenceUnit.cHz,
|
|
29
|
+
FrequenceUnit.mHz,
|
|
30
|
+
];
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.FrequenceUnit = FrequenceUnit;
|
|
34
|
+
FrequenceUnit.kHz = new FrequenceUnit("kHz");
|
|
35
|
+
FrequenceUnit.hHZ = new FrequenceUnit("hHz");
|
|
36
|
+
FrequenceUnit.daHz = new FrequenceUnit("daHz");
|
|
37
|
+
FrequenceUnit.Hz = new FrequenceUnit("Hz");
|
|
38
|
+
FrequenceUnit.dHz = new FrequenceUnit("dHz");
|
|
39
|
+
FrequenceUnit.cHz = new FrequenceUnit("cHz");
|
|
40
|
+
FrequenceUnit.mHz = new FrequenceUnit("mHz");
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Measure } from "../../../pc/measure/measure";
|
|
2
|
+
import { BasicUnit } from "./basicUnit";
|
|
3
|
+
import { ConvertOptions, Unit } from "./unit";
|
|
4
|
+
export declare abstract class BaseTenUnit<T extends string> extends BasicUnit<T> {
|
|
5
|
+
convert(significantPart: number, exponent: number, convertToUnit: T, convertOptions?: ConvertOptions): Measure<T>;
|
|
6
|
+
abstract className(): string;
|
|
7
|
+
abstract getUnitsValues(): string[];
|
|
8
|
+
abstract getUnitsObjects(): Unit<T>[];
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=baseTenUnit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"baseTenUnit.d.ts","sourceRoot":"","sources":["../../../../src/pc/units/interfaces/baseTenUnit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9C,8BAAsB,WAAW,CAAC,CAAC,SAAS,MAAM,CAAE,SAAQ,SAAS,CAAC,CAAC,CAAC;IACtE,OAAO,CACL,eAAe,EAAE,MAAM,EACvB,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,CAAC,EAChB,cAAc,CAAC,EAAE,cAAc,GAC9B,OAAO,CAAC,CAAC,CAAC;IAab,QAAQ,CAAC,SAAS,IAAI,MAAM;IAC5B,QAAQ,CAAC,cAAc,IAAI,MAAM,EAAE;IACnC,QAAQ,CAAC,eAAe,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE;CACtC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BaseTenUnit = void 0;
|
|
4
|
+
const measure_1 = require("../../../pc/measure/measure");
|
|
5
|
+
const basicUnit_1 = require("./basicUnit");
|
|
6
|
+
class BaseTenUnit extends basicUnit_1.BasicUnit {
|
|
7
|
+
convert(significantPart, exponent, convertToUnit, convertOptions) {
|
|
8
|
+
const units = this.getUnitsValues();
|
|
9
|
+
const unitsObject = this.getUnitsObjects();
|
|
10
|
+
const thisUnitIndex = units.findIndex((value) => this.unit === value);
|
|
11
|
+
const unitIndex = units.findIndex((value) => convertToUnit === value);
|
|
12
|
+
const resultIndex = unitIndex - thisUnitIndex;
|
|
13
|
+
return new measure_1.Measure(significantPart, exponent + resultIndex, unitsObject[unitIndex]);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.BaseTenUnit = BaseTenUnit;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Measure } from "../../../pc/measure/measure";
|
|
2
|
+
import { AlgebraicNode } from "../../../tree/nodes/algebraicNode";
|
|
3
|
+
import { ConvertOptions, Unit } from "./unit";
|
|
4
|
+
export declare abstract class BasicUnit<T extends string> implements Unit<T> {
|
|
5
|
+
unit: string;
|
|
6
|
+
constructor(unit: string);
|
|
7
|
+
getUnit(): string;
|
|
8
|
+
toTex(): string;
|
|
9
|
+
toTree(): AlgebraicNode;
|
|
10
|
+
abstract convert?(significantPart: number, exponent: number, convertToUnit: T, convertOptions?: ConvertOptions): Measure<T>;
|
|
11
|
+
abstract className(): string;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=basicUnit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"basicUnit.d.ts","sourceRoot":"","sources":["../../../../src/pc/units/interfaces/basicUnit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAE/D,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9C,8BAAsB,SAAS,CAAC,CAAC,SAAS,MAAM,CAAE,YAAW,IAAI,CAAC,CAAC,CAAC;IAClE,IAAI,EAAE,MAAM,CAAC;gBAED,IAAI,EAAE,MAAM;IAIxB,OAAO,IAAI,MAAM;IAIjB,KAAK,IAAI,MAAM;IAGf,MAAM,IAAI,aAAa;IAGvB,QAAQ,CAAC,OAAO,CAAC,CACf,eAAe,EAAE,MAAM,EACvB,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,CAAC,EAChB,cAAc,CAAC,EAAE,cAAc,GAC9B,OAAO,CAAC,CAAC,CAAC;IACb,QAAQ,CAAC,SAAS,IAAI,MAAM;CAC7B"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BasicUnit = void 0;
|
|
4
|
+
const variableNode_1 = require("../../../tree/nodes/variables/variableNode");
|
|
5
|
+
class BasicUnit {
|
|
6
|
+
constructor(unit) {
|
|
7
|
+
this.unit = unit;
|
|
8
|
+
}
|
|
9
|
+
getUnit() {
|
|
10
|
+
return this.unit;
|
|
11
|
+
}
|
|
12
|
+
toTex() {
|
|
13
|
+
return `\\text{${this.unit}}`;
|
|
14
|
+
}
|
|
15
|
+
toTree() {
|
|
16
|
+
return new variableNode_1.VariableNode(this.toTex());
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.BasicUnit = BasicUnit;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Measure } from "../../../pc/measure/measure";
|
|
2
|
+
import { AlgebraicNode } from "../../../tree/nodes/algebraicNode";
|
|
3
|
+
export type ConvertOptions = {
|
|
4
|
+
nonScientific?: boolean;
|
|
5
|
+
};
|
|
6
|
+
export interface Unit<T extends string> {
|
|
7
|
+
getUnit(): string;
|
|
8
|
+
className(): string;
|
|
9
|
+
toTex(): string;
|
|
10
|
+
toTree(): AlgebraicNode;
|
|
11
|
+
convert?(significantPart: number, exponent: number, convertToUnit: T, convertOpts?: ConvertOptions): Measure<T>;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=unit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unit.d.ts","sourceRoot":"","sources":["../../../../src/pc/units/interfaces/unit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAE/D,MAAM,MAAM,cAAc,GAAG;IAC3B,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AACF,MAAM,WAAW,IAAI,CAAC,CAAC,SAAS,MAAM;IACpC,OAAO,IAAI,MAAM,CAAC;IAClB,SAAS,IAAI,MAAM,CAAC;IACpB,KAAK,IAAI,MAAM,CAAC;IAChB,MAAM,IAAI,aAAa,CAAC;IACxB,OAAO,CAAC,CACN,eAAe,EAAE,MAAM,EACvB,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,CAAC,EAChB,WAAW,CAAC,EAAE,cAAc,GAC3B,OAAO,CAAC,CAAC,CAAC,CAAC;CACf"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BaseTenUnit } from "./interfaces/baseTenUnit";
|
|
2
|
+
import { Unit } from "./interfaces/unit";
|
|
3
|
+
type massValues = "kg" | "hg" | "dag" | "g" | "dg" | "cg" | "mg";
|
|
4
|
+
export declare class MassUnit extends BaseTenUnit<massValues> {
|
|
5
|
+
static readonly kg: MassUnit;
|
|
6
|
+
static readonly hg: MassUnit;
|
|
7
|
+
static readonly dag: MassUnit;
|
|
8
|
+
static readonly g: MassUnit;
|
|
9
|
+
static readonly dg: MassUnit;
|
|
10
|
+
static readonly cg: MassUnit;
|
|
11
|
+
static readonly mg: MassUnit;
|
|
12
|
+
className(): string;
|
|
13
|
+
getUnitsValues(): string[];
|
|
14
|
+
getUnitsObjects(): Unit<massValues>[];
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=massUnits.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"massUnits.d.ts","sourceRoot":"","sources":["../../../src/pc/units/massUnits.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,KAAK,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,GAAG,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAIjE,qBAAa,QAAS,SAAQ,WAAW,CAAC,UAAU,CAAC;IACnD,MAAM,CAAC,QAAQ,CAAC,EAAE,WAAsB;IACxC,MAAM,CAAC,QAAQ,CAAC,EAAE,WAAsB;IACxC,MAAM,CAAC,QAAQ,CAAC,GAAG,WAAuB;IAC1C,MAAM,CAAC,QAAQ,CAAC,CAAC,WAAqB;IACtC,MAAM,CAAC,QAAQ,CAAC,EAAE,WAAsB;IACxC,MAAM,CAAC,QAAQ,CAAC,EAAE,WAAsB;IACxC,MAAM,CAAC,QAAQ,CAAC,EAAE,WAAsB;IAExC,SAAS,IAAI,MAAM;IAGnB,cAAc,IAAI,MAAM,EAAE;IAG1B,eAAe,IAAI,IAAI,CAAC,UAAU,CAAC,EAAE;CAWtC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MassUnit = void 0;
|
|
4
|
+
const baseTenUnit_1 = require("./interfaces/baseTenUnit");
|
|
5
|
+
const mass = ["kg", "hg", "dag", "g", "dg", "cg", "mg"];
|
|
6
|
+
class MassUnit extends baseTenUnit_1.BaseTenUnit {
|
|
7
|
+
className() {
|
|
8
|
+
return "MassUnit";
|
|
9
|
+
}
|
|
10
|
+
getUnitsValues() {
|
|
11
|
+
return mass;
|
|
12
|
+
}
|
|
13
|
+
getUnitsObjects() {
|
|
14
|
+
return [
|
|
15
|
+
MassUnit.kg,
|
|
16
|
+
MassUnit.hg,
|
|
17
|
+
MassUnit.dag,
|
|
18
|
+
MassUnit.g,
|
|
19
|
+
MassUnit.dg,
|
|
20
|
+
MassUnit.cg,
|
|
21
|
+
MassUnit.mg,
|
|
22
|
+
];
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.MassUnit = MassUnit;
|
|
26
|
+
MassUnit.kg = new MassUnit("kg");
|
|
27
|
+
MassUnit.hg = new MassUnit("hg");
|
|
28
|
+
MassUnit.dag = new MassUnit("dag");
|
|
29
|
+
MassUnit.g = new MassUnit("g");
|
|
30
|
+
MassUnit.dg = new MassUnit("dg");
|
|
31
|
+
MassUnit.cg = new MassUnit("cg");
|
|
32
|
+
MassUnit.mg = new MassUnit("mg");
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Unit } from "./interfaces/unit";
|
|
2
|
+
import { MultiplyNode } from "../../tree/nodes/operators/multiplyNode";
|
|
3
|
+
export declare class MultiplyUnit implements Unit<any> {
|
|
4
|
+
leftChild: Unit<any>;
|
|
5
|
+
rightChild: Unit<any>;
|
|
6
|
+
unit: string;
|
|
7
|
+
constructor(leftChild: Unit<any>, rightChild: Unit<any>);
|
|
8
|
+
className(): string;
|
|
9
|
+
toTex(): string;
|
|
10
|
+
toTree(): MultiplyNode;
|
|
11
|
+
getUnit(): string;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=mulitplyUnits.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mulitplyUnits.d.ts","sourceRoot":"","sources":["../../../src/pc/units/mulitplyUnits.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAEvE,qBAAa,YAAa,YAAW,IAAI,CAAC,GAAG,CAAC;IAC5C,SAAS,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;IACrB,UAAU,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;gBAED,SAAS,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,UAAU,EAAE,IAAI,CAAC,GAAG,CAAC;IAKvD,SAAS,IAAI,MAAM;IAInB,KAAK,IAAI,MAAM;IAMf,MAAM,IAAI,YAAY;IAItB,OAAO,IAAI,MAAM;CAGlB"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MultiplyUnit = void 0;
|
|
4
|
+
const multiplyNode_1 = require("../../tree/nodes/operators/multiplyNode");
|
|
5
|
+
class MultiplyUnit {
|
|
6
|
+
constructor(leftChild, rightChild) {
|
|
7
|
+
this.leftChild = leftChild;
|
|
8
|
+
this.rightChild = rightChild;
|
|
9
|
+
this.unit = rightChild.getUnit() + `\\cdot` + leftChild.getUnit();
|
|
10
|
+
}
|
|
11
|
+
className() {
|
|
12
|
+
return "MultiplyUnit";
|
|
13
|
+
}
|
|
14
|
+
toTex() {
|
|
15
|
+
return this.toTree()
|
|
16
|
+
.simplify({ keepPowers: true })
|
|
17
|
+
.toTex({ forceDotSign: true });
|
|
18
|
+
}
|
|
19
|
+
toTree() {
|
|
20
|
+
return new multiplyNode_1.MultiplyNode(this.leftChild.toTree(), this.rightChild.toTree());
|
|
21
|
+
}
|
|
22
|
+
getUnit() {
|
|
23
|
+
return this.unit;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.MultiplyUnit = MultiplyUnit;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { NumberNode } from "../../tree/nodes/numbers/numberNode";
|
|
2
|
+
import { PowerNode } from "../../tree/nodes/operators/powerNode";
|
|
3
|
+
import { Unit } from "./interfaces/unit";
|
|
4
|
+
export declare class PowerUnit implements Unit<any> {
|
|
5
|
+
leftChild: Unit<any>;
|
|
6
|
+
rightChild: NumberNode;
|
|
7
|
+
unit: string;
|
|
8
|
+
constructor(leftChild: Unit<any>, rightChild: NumberNode);
|
|
9
|
+
toTex(): string;
|
|
10
|
+
toTree(): PowerNode;
|
|
11
|
+
getUnit(): string;
|
|
12
|
+
className(): string;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=powerUnits.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"powerUnits.d.ts","sourceRoot":"","sources":["../../../src/pc/units/powerUnits.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAEjE,OAAO,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AACjE,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,qBAAa,SAAU,YAAW,IAAI,CAAC,GAAG,CAAC;IACzC,SAAS,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;IACrB,UAAU,EAAE,UAAU,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;gBAED,SAAS,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,UAAU,EAAE,UAAU;IAMxD,KAAK,IAAI,MAAM;IAMf,MAAM,IAAI,SAAS;IAInB,OAAO,IAAI,MAAM;IAIjB,SAAS,IAAI,MAAM;CAGpB"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PowerUnit = void 0;
|
|
4
|
+
const powerNode_1 = require("../../tree/nodes/operators/powerNode");
|
|
5
|
+
class PowerUnit {
|
|
6
|
+
constructor(leftChild, rightChild) {
|
|
7
|
+
this.leftChild = leftChild;
|
|
8
|
+
this.rightChild = rightChild;
|
|
9
|
+
this.unit = leftChild.getUnit() + `^${rightChild}`;
|
|
10
|
+
}
|
|
11
|
+
toTex() {
|
|
12
|
+
return this.toTree()
|
|
13
|
+
.simplify({ keepPowers: true })
|
|
14
|
+
.toTex({ forceDotSign: true });
|
|
15
|
+
}
|
|
16
|
+
toTree() {
|
|
17
|
+
return new powerNode_1.PowerNode(this.leftChild.toTree(), this.rightChild);
|
|
18
|
+
}
|
|
19
|
+
getUnit() {
|
|
20
|
+
return this.unit;
|
|
21
|
+
}
|
|
22
|
+
className() {
|
|
23
|
+
return "PowerUnit";
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.PowerUnit = PowerUnit;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Measure } from "../measure/measure";
|
|
2
|
+
import { BasicUnit } from "./interfaces/basicUnit";
|
|
3
|
+
export type timeValues = "h" | "mi" | "s" | "ms";
|
|
4
|
+
export declare class TimeUnit extends BasicUnit<timeValues> {
|
|
5
|
+
static readonly h: TimeUnit;
|
|
6
|
+
static readonly mi: TimeUnit;
|
|
7
|
+
static readonly s: TimeUnit;
|
|
8
|
+
static readonly ms: TimeUnit;
|
|
9
|
+
className(): string;
|
|
10
|
+
convert(significantPart: number, exponent: number, convertToUnit: timeValues): Measure<timeValues>;
|
|
11
|
+
convertToMinute(significantPart: number): number;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=timeUnits.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timeUnits.d.ts","sourceRoot":"","sources":["../../../src/pc/units/timeUnits.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,MAAM,MAAM,UAAU,GAAG,GAAG,GAAG,IAAI,GAAG,GAAG,GAAG,IAAI,CAAC;AAKjD,qBAAa,QAAS,SAAQ,SAAS,CAAC,UAAU,CAAC;IACjD,MAAM,CAAC,QAAQ,CAAC,CAAC,WAAqB;IACtC,MAAM,CAAC,QAAQ,CAAC,EAAE,WAAsB;IACxC,MAAM,CAAC,QAAQ,CAAC,CAAC,WAAqB;IACtC,MAAM,CAAC,QAAQ,CAAC,EAAE,WAAsB;IAExC,SAAS,IAAI,MAAM;IAInB,OAAO,CACL,eAAe,EAAE,MAAM,EACvB,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,UAAU,GACxB,OAAO,CAAC,UAAU,CAAC;IAatB,eAAe,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM;CAajD"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TimeUnit = void 0;
|
|
4
|
+
const measure_1 = require("../measure/measure");
|
|
5
|
+
const basicUnit_1 = require("./interfaces/basicUnit");
|
|
6
|
+
const times = ["h", "mi", "s", "ms"];
|
|
7
|
+
const timesValue = [1 / 60, 1, 60, 60000];
|
|
8
|
+
class TimeUnit extends basicUnit_1.BasicUnit {
|
|
9
|
+
className() {
|
|
10
|
+
return "TimeUnit";
|
|
11
|
+
}
|
|
12
|
+
convert(significantPart, exponent, convertToUnit) {
|
|
13
|
+
const timeObjects = [TimeUnit.h, TimeUnit.mi, TimeUnit.s, TimeUnit.ms];
|
|
14
|
+
const unitIndex = times.findIndex((value) => convertToUnit === value);
|
|
15
|
+
if (!times.includes(convertToUnit))
|
|
16
|
+
throw new Error(`cannot convert ${this.toTex()} to ${convertToUnit}.`);
|
|
17
|
+
let convertedSignificantPart = this.convertToMinute(significantPart);
|
|
18
|
+
if (convertToUnit !== "mi") {
|
|
19
|
+
convertedSignificantPart =
|
|
20
|
+
timesValue[unitIndex] * convertedSignificantPart;
|
|
21
|
+
}
|
|
22
|
+
return new measure_1.Measure(significantPart, exponent, timeObjects[unitIndex]);
|
|
23
|
+
}
|
|
24
|
+
convertToMinute(significantPart) {
|
|
25
|
+
switch (this.unit) {
|
|
26
|
+
case "h":
|
|
27
|
+
return significantPart * 60;
|
|
28
|
+
case "mi":
|
|
29
|
+
return significantPart;
|
|
30
|
+
case "s:":
|
|
31
|
+
return significantPart / 60;
|
|
32
|
+
case "ms":
|
|
33
|
+
return significantPart / 60000;
|
|
34
|
+
}
|
|
35
|
+
return 0;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.TimeUnit = TimeUnit;
|
|
39
|
+
TimeUnit.h = new TimeUnit("h");
|
|
40
|
+
TimeUnit.mi = new TimeUnit("mi");
|
|
41
|
+
TimeUnit.s = new TimeUnit("s");
|
|
42
|
+
TimeUnit.ms = new TimeUnit("ms");
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BaseTenUnit } from "./interfaces/baseTenUnit";
|
|
2
|
+
import { Unit } from "./interfaces/unit";
|
|
3
|
+
type volumeValues = "kL" | "hL" | "daL" | "L" | "dL" | "cL" | "mL";
|
|
4
|
+
export declare class VolumeUnit extends BaseTenUnit<volumeValues> {
|
|
5
|
+
static readonly kL: VolumeUnit;
|
|
6
|
+
static readonly hL: VolumeUnit;
|
|
7
|
+
static readonly daL: VolumeUnit;
|
|
8
|
+
static readonly L: VolumeUnit;
|
|
9
|
+
static readonly dL: VolumeUnit;
|
|
10
|
+
static readonly cL: VolumeUnit;
|
|
11
|
+
static readonly mL: VolumeUnit;
|
|
12
|
+
className(): string;
|
|
13
|
+
getUnitsValues(): string[];
|
|
14
|
+
getUnitsObjects(): Unit<volumeValues>[];
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=volumeUnit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"volumeUnit.d.ts","sourceRoot":"","sources":["../../../src/pc/units/volumeUnit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,KAAK,YAAY,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,GAAG,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAInE,qBAAa,UAAW,SAAQ,WAAW,CAAC,YAAY,CAAC;IACvD,MAAM,CAAC,QAAQ,CAAC,EAAE,aAAwB;IAC1C,MAAM,CAAC,QAAQ,CAAC,EAAE,aAAwB;IAC1C,MAAM,CAAC,QAAQ,CAAC,GAAG,aAAyB;IAC5C,MAAM,CAAC,QAAQ,CAAC,CAAC,aAAuB;IACxC,MAAM,CAAC,QAAQ,CAAC,EAAE,aAAwB;IAC1C,MAAM,CAAC,QAAQ,CAAC,EAAE,aAAwB;IAC1C,MAAM,CAAC,QAAQ,CAAC,EAAE,aAAwB;IAE1C,SAAS,IAAI,MAAM;IAInB,cAAc,IAAI,MAAM,EAAE;IAI1B,eAAe,IAAI,IAAI,CAAC,YAAY,CAAC,EAAE;CAWxC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VolumeUnit = void 0;
|
|
4
|
+
const baseTenUnit_1 = require("./interfaces/baseTenUnit");
|
|
5
|
+
const L = ["kL", "hL", "daL", "L", "dL", "cL", "mL"];
|
|
6
|
+
class VolumeUnit extends baseTenUnit_1.BaseTenUnit {
|
|
7
|
+
className() {
|
|
8
|
+
return "VolumeUnit";
|
|
9
|
+
}
|
|
10
|
+
getUnitsValues() {
|
|
11
|
+
return L;
|
|
12
|
+
}
|
|
13
|
+
getUnitsObjects() {
|
|
14
|
+
return [
|
|
15
|
+
VolumeUnit.kL,
|
|
16
|
+
VolumeUnit.hL,
|
|
17
|
+
VolumeUnit.daL,
|
|
18
|
+
VolumeUnit.L,
|
|
19
|
+
VolumeUnit.dL,
|
|
20
|
+
VolumeUnit.cL,
|
|
21
|
+
VolumeUnit.mL,
|
|
22
|
+
];
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.VolumeUnit = VolumeUnit;
|
|
26
|
+
VolumeUnit.kL = new VolumeUnit("kL");
|
|
27
|
+
VolumeUnit.hL = new VolumeUnit("hL");
|
|
28
|
+
VolumeUnit.daL = new VolumeUnit("daL");
|
|
29
|
+
VolumeUnit.L = new VolumeUnit("L");
|
|
30
|
+
VolumeUnit.dL = new VolumeUnit("dL");
|
|
31
|
+
VolumeUnit.cL = new VolumeUnit("cL");
|
|
32
|
+
VolumeUnit.mL = new VolumeUnit("mL");
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BaseTenUnit } from "./interfaces/baseTenUnit";
|
|
2
|
+
import { Unit } from "./interfaces/unit";
|
|
3
|
+
type wattValues = "kW" | "hW" | "daW" | "W" | "dW" | "cW" | "mW";
|
|
4
|
+
export declare class WattUnit extends BaseTenUnit<wattValues> {
|
|
5
|
+
static readonly kW: WattUnit;
|
|
6
|
+
static readonly hW: WattUnit;
|
|
7
|
+
static readonly daW: WattUnit;
|
|
8
|
+
static readonly W: WattUnit;
|
|
9
|
+
static readonly dW: WattUnit;
|
|
10
|
+
static readonly cW: WattUnit;
|
|
11
|
+
static readonly mW: WattUnit;
|
|
12
|
+
className(): string;
|
|
13
|
+
getUnitsValues(): string[];
|
|
14
|
+
getUnitsObjects(): Unit<wattValues>[];
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=wattUnit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wattUnit.d.ts","sourceRoot":"","sources":["../../../src/pc/units/wattUnit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,KAAK,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,GAAG,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAIjE,qBAAa,QAAS,SAAQ,WAAW,CAAC,UAAU,CAAC;IACnD,MAAM,CAAC,QAAQ,CAAC,EAAE,WAAsB;IACxC,MAAM,CAAC,QAAQ,CAAC,EAAE,WAAsB;IACxC,MAAM,CAAC,QAAQ,CAAC,GAAG,WAAuB;IAC1C,MAAM,CAAC,QAAQ,CAAC,CAAC,WAAqB;IACtC,MAAM,CAAC,QAAQ,CAAC,EAAE,WAAsB;IACxC,MAAM,CAAC,QAAQ,CAAC,EAAE,WAAsB;IACxC,MAAM,CAAC,QAAQ,CAAC,EAAE,WAAsB;IACxC,SAAS,IAAI,MAAM;IAGnB,cAAc,IAAI,MAAM,EAAE;IAG1B,eAAe,IAAI,IAAI,CAAC,UAAU,CAAC,EAAE;CAWtC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WattUnit = void 0;
|
|
4
|
+
const baseTenUnit_1 = require("./interfaces/baseTenUnit");
|
|
5
|
+
const wattsUnits = ["kW", "hW", "daW", "W", "dW", "cW", "mW"];
|
|
6
|
+
class WattUnit extends baseTenUnit_1.BaseTenUnit {
|
|
7
|
+
className() {
|
|
8
|
+
return "WattUnit";
|
|
9
|
+
}
|
|
10
|
+
getUnitsValues() {
|
|
11
|
+
return wattsUnits;
|
|
12
|
+
}
|
|
13
|
+
getUnitsObjects() {
|
|
14
|
+
return [
|
|
15
|
+
WattUnit.kW,
|
|
16
|
+
WattUnit.hW,
|
|
17
|
+
WattUnit.daW,
|
|
18
|
+
WattUnit.W,
|
|
19
|
+
WattUnit.dW,
|
|
20
|
+
WattUnit.cW,
|
|
21
|
+
WattUnit.mW,
|
|
22
|
+
];
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.WattUnit = WattUnit;
|
|
26
|
+
WattUnit.kW = new WattUnit("kW");
|
|
27
|
+
WattUnit.hW = new WattUnit("hW");
|
|
28
|
+
WattUnit.daW = new WattUnit("daW");
|
|
29
|
+
WattUnit.W = new WattUnit("W");
|
|
30
|
+
WattUnit.dW = new WattUnit("dW");
|
|
31
|
+
WattUnit.cW = new WattUnit("cW");
|
|
32
|
+
WattUnit.mW = new WattUnit("mW");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"playground.d.ts","sourceRoot":"","sources":["../src/playground.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,UAAU,YAgBtB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.playground = void 0;
|
|
4
|
+
const affine_1 = require("./math/polynomials/affine");
|
|
5
|
+
const addNode_1 = require("./tree/nodes/operators/addNode");
|
|
6
|
+
const multiplyNode_1 = require("./tree/nodes/operators/multiplyNode");
|
|
7
|
+
const random_1 = require("./utils/random");
|
|
8
|
+
const shuffle_1 = require("./utils/shuffle");
|
|
9
|
+
const playground = () => {
|
|
10
|
+
const affines = affine_1.AffineConstructor.differentRandoms(3);
|
|
11
|
+
const permut = [
|
|
12
|
+
(0, shuffle_1.shuffle)([affines[0], affines[1]]),
|
|
13
|
+
(0, shuffle_1.shuffle)([affines[0], affines[2]]),
|
|
14
|
+
];
|
|
15
|
+
const operation = (0, random_1.random)(["add", "substract"]);
|
|
16
|
+
const statementTree = new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(permut[0][0].toTree(), permut[0][1].toTree()), new multiplyNode_1.MultiplyNode(permut[1][0].toTree(), permut[1][1].toTree()));
|
|
17
|
+
console.log(statementTree.simplify().toTex());
|
|
18
|
+
};
|
|
19
|
+
exports.playground = playground;
|
package/lib/server.d.ts
CHANGED
package/lib/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAuC3D,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,MAAM,EAAE,MAAM,aAAa,CAAC;QAC5B,SAAS,EAAE,MAAM,MAAM,CAAC;QACxB,YAAY,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,KAAK,aAAa,CAAC;KACpD;IACD,UAAU,MAAM;QACd,MAAM,EAAE,MAAM,aAAa,CAAC;KAC7B;CACF"}
|
package/lib/server.js
CHANGED
|
@@ -35,13 +35,15 @@ const dotenv_1 = __importDefault(require("dotenv"));
|
|
|
35
35
|
const cors_1 = __importDefault(require("cors"));
|
|
36
36
|
const numberNode_1 = require("./tree/nodes/numbers/numberNode");
|
|
37
37
|
const infiniteNode_1 = require("./tree/nodes/numbers/infiniteNode");
|
|
38
|
-
const multiplyNode_1 = require("./tree/nodes/operators/multiplyNode");
|
|
39
38
|
const toScientific_1 = require("./utils/numberPrototype/toScientific");
|
|
40
39
|
const variableNode_1 = require("./tree/nodes/variables/variableNode");
|
|
41
40
|
const jsonParser = body_parser_1.default.json();
|
|
42
41
|
const mathExercises = Object.values(MathExercises);
|
|
43
42
|
const pcExercises = Object.values(PCExercises);
|
|
44
43
|
const allExercises = [...mathExercises, ...pcExercises];
|
|
44
|
+
String.prototype.toTree = function () {
|
|
45
|
+
return new variableNode_1.VariableNode(this.valueOf());
|
|
46
|
+
};
|
|
45
47
|
Number.prototype.toTree = function () {
|
|
46
48
|
const value = this.valueOf();
|
|
47
49
|
if (value === Infinity)
|
|
@@ -61,14 +63,18 @@ const runServer = () => {
|
|
|
61
63
|
const app = (0, express_1.default)();
|
|
62
64
|
app.use((0, cors_1.default)());
|
|
63
65
|
console.log("math exos", mathExercises.length);
|
|
66
|
+
console.log("math hints", mathExercises.filter((exo) => exo.hasHintAndCorrection).length);
|
|
64
67
|
console.log("pc exos", pcExercises.length);
|
|
65
|
-
|
|
66
|
-
.simplify()
|
|
67
|
-
.toTex();
|
|
68
|
-
console.log(node);
|
|
68
|
+
// playground();
|
|
69
69
|
app.get("/", (req, res) => {
|
|
70
70
|
res.json(allExercises);
|
|
71
71
|
});
|
|
72
|
+
app.get("/mathlive", (req, res) => {
|
|
73
|
+
res.json(mathExercises);
|
|
74
|
+
});
|
|
75
|
+
app.get("/xplive", (req, res) => {
|
|
76
|
+
res.json(pcExercises);
|
|
77
|
+
});
|
|
72
78
|
app.get("/exo", (req, res) => {
|
|
73
79
|
const exoId = req.query.exoId;
|
|
74
80
|
const exoIndex = allExercises.findIndex((exo) => exo.id == exoId);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"equationSolutionNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/equations/equationSolutionNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,KAAK,2BAA2B,GAAG;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,WAAW,CAAA;CAAE,CAAC;AAC7E,qBAAa,oBAAqB,YAAW,IAAI;IAC/C,IAAI,EAAE,QAAQ,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,eAAe,CAAC;IAC9B,IAAI,CAAC,EAAE,WAAW,CAAC;gBAEjB,YAAY,EAAE,eAAe,EAC7B,MAAM,CAAC,EAAE,2BAA2B;IActC,cAAc;IAId,SAAS;
|
|
1
|
+
{"version":3,"file":"equationSolutionNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/equations/equationSolutionNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,KAAK,2BAA2B,GAAG;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,WAAW,CAAA;CAAE,CAAC;AAC7E,qBAAa,oBAAqB,YAAW,IAAI;IAC/C,IAAI,EAAE,QAAQ,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,eAAe,CAAC;IAC9B,IAAI,CAAC,EAAE,WAAW,CAAC;gBAEjB,YAAY,EAAE,eAAe,EAC7B,MAAM,CAAC,EAAE,2BAA2B;IActC,cAAc;IAId,SAAS;IAiBT,iBAAiB,CAAC,IAAI,CAAC,EAAE,WAAW;IAQpC,YAAY;IAGZ,QAAQ;IAGR,KAAK;CAGN"}
|