math-exercises 2.2.2 → 2.2.4
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/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/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 +59 -0
- 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 +77 -0
- 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/conversion/lengthConversion.d.ts.map +1 -1
- package/lib/exercises/math/conversion/lengthConversion.js +18 -4
- 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/pc/calibrationCurveOfSolution.js +1 -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 +1 -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 +99 -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/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 +180 -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.js +1 -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 +118 -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 +116 -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 +143 -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 +80 -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 +122 -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 +94 -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 +77 -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 +77 -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 +140 -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 +83 -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 +121 -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 +167 -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 +142 -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 +101 -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 +116 -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 +131 -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 +117 -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 +67 -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 +121 -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 +145 -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 +167 -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/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 +85 -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/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 +160 -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 +72 -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 +6 -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/geogebra/deleteObjectNamesFromAnswer.d.ts +1 -1
- package/lib/geogebra/deleteObjectNamesFromAnswer.d.ts.map +1 -1
- package/lib/geogebra/deleteObjectNamesFromAnswer.js +2 -2
- package/lib/index.d.ts +188 -11
- package/lib/index.d.ts.map +1 -1
- 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/server.d.ts.map +1 -1
- package/lib/server.js +6 -6
- package/lib/tree/nodes/node.d.ts +3 -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 +32 -10
- package/lib/tree/nodes/operators/powerNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/powerNode.js +12 -0
- package/package.json +1 -1
|
@@ -1,17 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Measure = exports.MeasureConstructor = void 0;
|
|
4
|
+
const frenchify_1 = require("../../math/utils/latex/frenchify");
|
|
4
5
|
const round_1 = require("../../math/utils/round");
|
|
5
6
|
const numberNode_1 = require("../../tree/nodes/numbers/numberNode");
|
|
6
7
|
const multiplyNode_1 = require("../../tree/nodes/operators/multiplyNode");
|
|
7
8
|
const powerNode_1 = require("../../tree/nodes/operators/powerNode");
|
|
9
|
+
const divideUnit_1 = require("../units/divideUnit");
|
|
10
|
+
const mulitplyUnits_1 = require("../units/mulitplyUnits");
|
|
8
11
|
class MeasureConstructor {
|
|
9
12
|
static random() { }
|
|
10
13
|
}
|
|
11
14
|
exports.MeasureConstructor = MeasureConstructor;
|
|
12
15
|
class Measure {
|
|
13
|
-
constructor(value, exponent = 0) {
|
|
16
|
+
constructor(value, exponent = 0, unit) {
|
|
14
17
|
// console.log("bf", value, exponent);
|
|
18
|
+
if (unit)
|
|
19
|
+
this.unit = unit;
|
|
15
20
|
if (value === 0) {
|
|
16
21
|
this.significantPart = 0;
|
|
17
22
|
this.exponent = 0;
|
|
@@ -23,10 +28,10 @@ class Measure {
|
|
|
23
28
|
this.significantPart = Number(stringValue[0] + "." + stringValue.replace(".", "").slice(1));
|
|
24
29
|
}
|
|
25
30
|
else if (value <= -10) {
|
|
26
|
-
const stringValue = value.toString();
|
|
27
|
-
const length = stringValue.split(".")[0].length -
|
|
31
|
+
const stringValue = value.toString().substring(1);
|
|
32
|
+
const length = stringValue.split(".")[0].length - 1;
|
|
28
33
|
this.exponent = exponent + length;
|
|
29
|
-
this.significantPart = Number("-" + stringValue[
|
|
34
|
+
this.significantPart = Number("-" + stringValue[0] + "." + stringValue.replace(".", "").slice(1));
|
|
30
35
|
}
|
|
31
36
|
else if (value > 0 && value < 1) {
|
|
32
37
|
const stringValue = value.toString();
|
|
@@ -59,37 +64,103 @@ class Measure {
|
|
|
59
64
|
}
|
|
60
65
|
times(n) {
|
|
61
66
|
if (typeof n === "number")
|
|
62
|
-
return
|
|
63
|
-
|
|
67
|
+
return this.unit
|
|
68
|
+
? new Measure(this.significantPart * n, this.exponent, this.unit)
|
|
69
|
+
: new Measure(this.significantPart * n, this.exponent);
|
|
70
|
+
if (this.unit && n.unit) {
|
|
71
|
+
return new Measure(this.significantPart * n.significantPart, this.exponent + n.exponent, new mulitplyUnits_1.MultiplyUnit(this.unit, n.unit));
|
|
72
|
+
}
|
|
73
|
+
return new Measure(this.significantPart * n.significantPart, this.exponent + n.exponent, this.unit ?? n.unit);
|
|
64
74
|
}
|
|
65
75
|
divide(n) {
|
|
66
76
|
if (typeof n === "number")
|
|
67
|
-
return new Measure(this.significantPart / n, this.exponent);
|
|
68
|
-
|
|
77
|
+
return new Measure(this.significantPart / n, this.exponent, this.unit);
|
|
78
|
+
if (this.unit && n.unit)
|
|
79
|
+
return new Measure(this.significantPart / n.significantPart, this.exponent - n.exponent, new divideUnit_1.DivideUnit(this.unit, n.unit));
|
|
80
|
+
return new Measure(this.significantPart / n.significantPart, this.exponent - n.exponent, this.unit ?? n.unit);
|
|
81
|
+
}
|
|
82
|
+
add(n) {
|
|
83
|
+
if (typeof n === "number") {
|
|
84
|
+
const commonExponent = Math.min(this.exponent, 0);
|
|
85
|
+
const scaledThis = this.significantPart * Math.pow(10, this.exponent - commonExponent);
|
|
86
|
+
const scaledN = n * Math.pow(10, -commonExponent);
|
|
87
|
+
const resultSignificant = scaledThis + scaledN;
|
|
88
|
+
return new Measure(resultSignificant, commonExponent, this.unit);
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
const commonExponent = Math.min(this.exponent, n.exponent);
|
|
92
|
+
const scaledThis = this.significantPart * Math.pow(10, this.exponent - commonExponent);
|
|
93
|
+
const scaledN = n.significantPart * Math.pow(10, n.exponent - commonExponent);
|
|
94
|
+
const resultSignificant = scaledThis + scaledN;
|
|
95
|
+
return new Measure(resultSignificant, commonExponent, this.unit ?? n.unit);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
subtract(n) {
|
|
99
|
+
if (typeof n === "number") {
|
|
100
|
+
const commonExponent = Math.min(this.exponent, 0);
|
|
101
|
+
const scaledThis = this.significantPart * Math.pow(10, this.exponent - commonExponent);
|
|
102
|
+
const scaledN = n * Math.pow(10, -commonExponent);
|
|
103
|
+
const resultSignificant = scaledThis - scaledN;
|
|
104
|
+
return new Measure(resultSignificant, commonExponent, this.unit);
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
const commonExponent = Math.min(this.exponent, n.exponent);
|
|
108
|
+
const scaledThis = this.significantPart * Math.pow(10, this.exponent - commonExponent);
|
|
109
|
+
const scaledN = n.significantPart * Math.pow(10, n.exponent - commonExponent);
|
|
110
|
+
const resultSignificant = scaledThis - scaledN;
|
|
111
|
+
return new Measure(resultSignificant, commonExponent, this.unit ?? n.unit);
|
|
112
|
+
}
|
|
69
113
|
}
|
|
70
114
|
toTex(opts) {
|
|
115
|
+
let tex = "";
|
|
71
116
|
const decimals = opts?.scientific;
|
|
72
117
|
const nbTree = decimals === undefined
|
|
73
118
|
? this.significantPart.toTree()
|
|
74
119
|
: new numberNode_1.NumberNode(this.significantPart, (0, round_1.roundSignificant)(this.significantPart, decimals));
|
|
75
|
-
if (
|
|
76
|
-
|
|
120
|
+
if (opts?.notScientific) {
|
|
121
|
+
tex = this.toNotScientificTex();
|
|
122
|
+
}
|
|
123
|
+
else if (this.exponent === 0) {
|
|
124
|
+
tex = nbTree.toTex();
|
|
77
125
|
}
|
|
78
|
-
if (this.exponent === 1) {
|
|
79
|
-
|
|
126
|
+
else if (this.exponent === 1) {
|
|
127
|
+
tex = new multiplyNode_1.MultiplyNode(nbTree, (10).toTree()).toTex({
|
|
80
128
|
scientific: decimals,
|
|
81
129
|
});
|
|
82
130
|
}
|
|
83
|
-
|
|
131
|
+
else {
|
|
132
|
+
tex = new multiplyNode_1.MultiplyNode(nbTree, new powerNode_1.PowerNode((10).toTree(), this.exponent.toTree())).toTex({ scientific: decimals });
|
|
133
|
+
}
|
|
134
|
+
return (tex + `${this.unit && !opts?.hideUnit ? `\\ ${this.unit.toTex()}` : ""}`);
|
|
135
|
+
}
|
|
136
|
+
toNotScientificTex() {
|
|
137
|
+
if (this.exponent === 0)
|
|
138
|
+
return (0, frenchify_1.frenchify)(this.significantPart);
|
|
139
|
+
let result = (this.significantPart + "").replace(".", "").replace("-", "");
|
|
140
|
+
if (this.exponent > 0) {
|
|
141
|
+
for (let n = result.length; n <= this.exponent; n++) {
|
|
142
|
+
result += 0;
|
|
143
|
+
}
|
|
144
|
+
if (this.exponent < result.length - 1 && this.exponent !== 0) {
|
|
145
|
+
result = `${result.substring(0, this.exponent + 1)},${result.slice(this.exponent + 1)}`;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
if (this.exponent < 0) {
|
|
149
|
+
for (let n = 0; n < Math.abs(this.exponent); n++) {
|
|
150
|
+
result = 0 + result;
|
|
151
|
+
}
|
|
152
|
+
result = `${result[0]},${result.slice(1)}`;
|
|
153
|
+
}
|
|
154
|
+
return this.significantPart < 0 ? "-" + result : result;
|
|
84
155
|
}
|
|
85
156
|
/**
|
|
86
157
|
* n = nb decimals
|
|
87
158
|
*/
|
|
88
159
|
toSignificant(n) {
|
|
89
|
-
return
|
|
160
|
+
return this.unit
|
|
161
|
+
? new Measure((0, round_1.round)(this.significantPart, n), this.exponent, this.unit)
|
|
162
|
+
: new Measure((0, round_1.round)(this.significantPart, n), this.exponent);
|
|
90
163
|
}
|
|
91
|
-
//gravité = 9.32423432
|
|
92
|
-
//new Measure(9432432).toSignificant(1).times(39)
|
|
93
164
|
evaluate() {
|
|
94
165
|
return this.significantPart * Math.pow(10, this.exponent);
|
|
95
166
|
}
|
|
@@ -102,5 +173,30 @@ class Measure {
|
|
|
102
173
|
exponent: this.exponent,
|
|
103
174
|
};
|
|
104
175
|
}
|
|
176
|
+
hasUnit() {
|
|
177
|
+
return this.unit ? true : false;
|
|
178
|
+
}
|
|
179
|
+
getUnit() {
|
|
180
|
+
if (!this.unit) {
|
|
181
|
+
throw new Error("This measure has no unit");
|
|
182
|
+
}
|
|
183
|
+
return this.unit;
|
|
184
|
+
}
|
|
185
|
+
convert(unit) {
|
|
186
|
+
if (this.unit && this.unit.convert) {
|
|
187
|
+
return this.unit.convert(this.significantPart, this.exponent, unit);
|
|
188
|
+
}
|
|
189
|
+
throw this.unit
|
|
190
|
+
? new Error(`Conversion is not yet implemented for ${this.unit.className()}`)
|
|
191
|
+
: new Error(`Cannot convert a measure without unit.`);
|
|
192
|
+
}
|
|
193
|
+
setUnit(unit) {
|
|
194
|
+
this.unit = unit;
|
|
195
|
+
}
|
|
196
|
+
getValueAsNumber() {
|
|
197
|
+
if (Math.abs(this.exponent) > 14)
|
|
198
|
+
throw new Error(`Cannot represent ${this.toTex({ hideUnit: true })} as a number.`);
|
|
199
|
+
return Math.pow(10, this.exponent) * this.significantPart;
|
|
200
|
+
}
|
|
105
201
|
}
|
|
106
202
|
exports.Measure = Measure;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BaseTenUnit } from "./interfaces/baseTenUnit";
|
|
2
|
+
import { Unit } from "./interfaces/unit";
|
|
3
|
+
type molValues = "kmol" | "hmol" | "damol" | "mol" | "dmol" | "cmol" | "mmol";
|
|
4
|
+
export declare class AmountOfSubstance extends BaseTenUnit<molValues> {
|
|
5
|
+
static readonly kmol: AmountOfSubstance;
|
|
6
|
+
static readonly hmol: AmountOfSubstance;
|
|
7
|
+
static readonly damol: AmountOfSubstance;
|
|
8
|
+
static readonly mol: AmountOfSubstance;
|
|
9
|
+
static readonly dmol: AmountOfSubstance;
|
|
10
|
+
static readonly cmol: AmountOfSubstance;
|
|
11
|
+
static readonly mmol: AmountOfSubstance;
|
|
12
|
+
className(): string;
|
|
13
|
+
getUnitsValues(): string[];
|
|
14
|
+
getUnitsObjects(): Unit<molValues>[];
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=AmountOfSubstance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AmountOfSubstance.d.ts","sourceRoot":"","sources":["../../../src/pc/units/AmountOfSubstance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,KAAK,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAY9E,qBAAa,iBAAkB,SAAQ,WAAW,CAAC,SAAS,CAAC;IAC3D,MAAM,CAAC,QAAQ,CAAC,IAAI,oBAAiC;IACrD,MAAM,CAAC,QAAQ,CAAC,IAAI,oBAAiC;IACrD,MAAM,CAAC,QAAQ,CAAC,KAAK,oBAAkC;IACvD,MAAM,CAAC,QAAQ,CAAC,GAAG,oBAAgC;IACnD,MAAM,CAAC,QAAQ,CAAC,IAAI,oBAAiC;IACrD,MAAM,CAAC,QAAQ,CAAC,IAAI,oBAAiC;IACrD,MAAM,CAAC,QAAQ,CAAC,IAAI,oBAAiC;IAErD,SAAS,IAAI,MAAM;IAGnB,cAAc,IAAI,MAAM,EAAE;IAG1B,eAAe,IAAI,IAAI,CAAC,SAAS,CAAC,EAAE;CAWrC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AmountOfSubstance = void 0;
|
|
4
|
+
const baseTenUnit_1 = require("./interfaces/baseTenUnit");
|
|
5
|
+
const mol = [
|
|
6
|
+
"kmol",
|
|
7
|
+
"hmol",
|
|
8
|
+
"damol",
|
|
9
|
+
"mol",
|
|
10
|
+
"dmol",
|
|
11
|
+
"cmol",
|
|
12
|
+
"mmol",
|
|
13
|
+
];
|
|
14
|
+
class AmountOfSubstance extends baseTenUnit_1.BaseTenUnit {
|
|
15
|
+
className() {
|
|
16
|
+
return "AmountOfSubstance";
|
|
17
|
+
}
|
|
18
|
+
getUnitsValues() {
|
|
19
|
+
return mol;
|
|
20
|
+
}
|
|
21
|
+
getUnitsObjects() {
|
|
22
|
+
return [
|
|
23
|
+
AmountOfSubstance.kmol,
|
|
24
|
+
AmountOfSubstance.hmol,
|
|
25
|
+
AmountOfSubstance.damol,
|
|
26
|
+
AmountOfSubstance.mol,
|
|
27
|
+
AmountOfSubstance.dmol,
|
|
28
|
+
AmountOfSubstance.cmol,
|
|
29
|
+
AmountOfSubstance.mmol,
|
|
30
|
+
];
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.AmountOfSubstance = AmountOfSubstance;
|
|
34
|
+
AmountOfSubstance.kmol = new AmountOfSubstance("kmol");
|
|
35
|
+
AmountOfSubstance.hmol = new AmountOfSubstance("hmol");
|
|
36
|
+
AmountOfSubstance.damol = new AmountOfSubstance("damol");
|
|
37
|
+
AmountOfSubstance.mol = new AmountOfSubstance("mol");
|
|
38
|
+
AmountOfSubstance.dmol = new AmountOfSubstance("dmol");
|
|
39
|
+
AmountOfSubstance.cmol = new AmountOfSubstance("cmol");
|
|
40
|
+
AmountOfSubstance.mmol = new AmountOfSubstance("mmol");
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BaseTenUnit } from "./interfaces/baseTenUnit";
|
|
2
|
+
import { Unit } from "./interfaces/unit";
|
|
3
|
+
type PaValues = "kPa" | "hPa" | "daPa" | "Pa" | "dPa" | "cPa" | "mPa";
|
|
4
|
+
export declare class PressionUnit extends BaseTenUnit<PaValues> {
|
|
5
|
+
static readonly kPa: PressionUnit;
|
|
6
|
+
static readonly hPa: PressionUnit;
|
|
7
|
+
static readonly daPa: PressionUnit;
|
|
8
|
+
static readonly Pa: PressionUnit;
|
|
9
|
+
static readonly dPa: PressionUnit;
|
|
10
|
+
static readonly cPa: PressionUnit;
|
|
11
|
+
static readonly mPa: PressionUnit;
|
|
12
|
+
className(): string;
|
|
13
|
+
getUnitsValues(): string[];
|
|
14
|
+
getUnitsObjects(): Unit<PaValues>[];
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=PressionUnit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PressionUnit.d.ts","sourceRoot":"","sources":["../../../src/pc/units/PressionUnit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,KAAK,QAAQ,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,GAAG,IAAI,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;AAItE,qBAAa,YAAa,SAAQ,WAAW,CAAC,QAAQ,CAAC;IACrD,MAAM,CAAC,QAAQ,CAAC,GAAG,eAA2B;IAC9C,MAAM,CAAC,QAAQ,CAAC,GAAG,eAA2B;IAC9C,MAAM,CAAC,QAAQ,CAAC,IAAI,eAA4B;IAChD,MAAM,CAAC,QAAQ,CAAC,EAAE,eAA0B;IAC5C,MAAM,CAAC,QAAQ,CAAC,GAAG,eAA2B;IAC9C,MAAM,CAAC,QAAQ,CAAC,GAAG,eAA2B;IAC9C,MAAM,CAAC,QAAQ,CAAC,GAAG,eAA2B;IAE9C,SAAS,IAAI,MAAM;IAGnB,cAAc,IAAI,MAAM,EAAE;IAG1B,eAAe,IAAI,IAAI,CAAC,QAAQ,CAAC,EAAE;CAWpC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PressionUnit = void 0;
|
|
4
|
+
const baseTenUnit_1 = require("./interfaces/baseTenUnit");
|
|
5
|
+
const paValues = ["kPa", "hPa", "daPa", "Pa", "dPa", "cPa", "mPa"];
|
|
6
|
+
class PressionUnit extends baseTenUnit_1.BaseTenUnit {
|
|
7
|
+
className() {
|
|
8
|
+
return "PressionUnit";
|
|
9
|
+
}
|
|
10
|
+
getUnitsValues() {
|
|
11
|
+
return paValues;
|
|
12
|
+
}
|
|
13
|
+
getUnitsObjects() {
|
|
14
|
+
return [
|
|
15
|
+
PressionUnit.kPa,
|
|
16
|
+
PressionUnit.hPa,
|
|
17
|
+
PressionUnit.daPa,
|
|
18
|
+
PressionUnit.Pa,
|
|
19
|
+
PressionUnit.dPa,
|
|
20
|
+
PressionUnit.cPa,
|
|
21
|
+
PressionUnit.mPa,
|
|
22
|
+
];
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.PressionUnit = PressionUnit;
|
|
26
|
+
PressionUnit.kPa = new PressionUnit("kPa");
|
|
27
|
+
PressionUnit.hPa = new PressionUnit("hPa");
|
|
28
|
+
PressionUnit.daPa = new PressionUnit("daPa");
|
|
29
|
+
PressionUnit.Pa = new PressionUnit("Pa");
|
|
30
|
+
PressionUnit.dPa = new PressionUnit("dPa");
|
|
31
|
+
PressionUnit.cPa = new PressionUnit("cPa");
|
|
32
|
+
PressionUnit.mPa = new PressionUnit("mPa");
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BaseTenUnit } from "./interfaces/baseTenUnit";
|
|
2
|
+
import { Unit } from "./interfaces/unit";
|
|
3
|
+
export type distanceUnits = "km" | "hm" | "dam" | "m" | "dm" | "cm" | "mm";
|
|
4
|
+
export declare class DistanceUnit extends BaseTenUnit<distanceUnits> {
|
|
5
|
+
getUnitsValues(): string[];
|
|
6
|
+
getUnitsObjects(): Unit<distanceUnits>[];
|
|
7
|
+
static readonly km: DistanceUnit;
|
|
8
|
+
static readonly hm: DistanceUnit;
|
|
9
|
+
static readonly dam: DistanceUnit;
|
|
10
|
+
static readonly m: DistanceUnit;
|
|
11
|
+
static readonly dm: DistanceUnit;
|
|
12
|
+
static readonly cm: DistanceUnit;
|
|
13
|
+
static readonly mm: DistanceUnit;
|
|
14
|
+
className(): string;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=distanceUnits.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"distanceUnits.d.ts","sourceRoot":"","sources":["../../../src/pc/units/distanceUnits.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,MAAM,MAAM,aAAa,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,GAAG,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE3E,qBAAa,YAAa,SAAQ,WAAW,CAAC,aAAa,CAAC;IAC1D,cAAc,IAAI,MAAM,EAAE;IAG1B,eAAe,IAAI,IAAI,CAAC,aAAa,CAAC,EAAE;IAWxC,MAAM,CAAC,QAAQ,CAAC,EAAE,eAA0B;IAC5C,MAAM,CAAC,QAAQ,CAAC,EAAE,eAA0B;IAC5C,MAAM,CAAC,QAAQ,CAAC,GAAG,eAA2B;IAC9C,MAAM,CAAC,QAAQ,CAAC,CAAC,eAAyB;IAC1C,MAAM,CAAC,QAAQ,CAAC,EAAE,eAA0B;IAC5C,MAAM,CAAC,QAAQ,CAAC,EAAE,eAA0B;IAC5C,MAAM,CAAC,QAAQ,CAAC,EAAE,eAA0B;IAE5C,SAAS,IAAI,MAAM;CAGpB"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DistanceUnit = void 0;
|
|
4
|
+
const baseTenUnit_1 = require("./interfaces/baseTenUnit");
|
|
5
|
+
const distances = ["km", "hm", "dam", "m", "dm", "cm", "mm"];
|
|
6
|
+
class DistanceUnit extends baseTenUnit_1.BaseTenUnit {
|
|
7
|
+
getUnitsValues() {
|
|
8
|
+
return distances;
|
|
9
|
+
}
|
|
10
|
+
getUnitsObjects() {
|
|
11
|
+
return [
|
|
12
|
+
DistanceUnit.km,
|
|
13
|
+
DistanceUnit.hm,
|
|
14
|
+
DistanceUnit.dam,
|
|
15
|
+
DistanceUnit.m,
|
|
16
|
+
DistanceUnit.dm,
|
|
17
|
+
DistanceUnit.cm,
|
|
18
|
+
DistanceUnit.mm,
|
|
19
|
+
];
|
|
20
|
+
}
|
|
21
|
+
className() {
|
|
22
|
+
return "DistanceUnit";
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.DistanceUnit = DistanceUnit;
|
|
26
|
+
DistanceUnit.km = new DistanceUnit("km");
|
|
27
|
+
DistanceUnit.hm = new DistanceUnit("hm");
|
|
28
|
+
DistanceUnit.dam = new DistanceUnit("dam");
|
|
29
|
+
DistanceUnit.m = new DistanceUnit("m");
|
|
30
|
+
DistanceUnit.dm = new DistanceUnit("dm");
|
|
31
|
+
DistanceUnit.cm = new DistanceUnit("cm");
|
|
32
|
+
DistanceUnit.mm = new DistanceUnit("mm");
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AlgebraicNode } from "../../tree/nodes/algebraicNode";
|
|
2
|
+
import { Unit } from "./interfaces/unit";
|
|
3
|
+
export declare class DivideUnit implements Unit<any> {
|
|
4
|
+
leftChild: Unit<any>;
|
|
5
|
+
rightChild: Unit<any>;
|
|
6
|
+
unit: string;
|
|
7
|
+
constructor(leftChild: Unit<any>, rightChild: Unit<any>);
|
|
8
|
+
toTex(): string;
|
|
9
|
+
toTree(): AlgebraicNode;
|
|
10
|
+
getUnit(): string;
|
|
11
|
+
className(): string;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=divideUnit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"divideUnit.d.ts","sourceRoot":"","sources":["../../../src/pc/units/divideUnit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAI/D,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,qBAAa,UAAW,YAAW,IAAI,CAAC,GAAG,CAAC;IAC1C,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,KAAK,IAAI,MAAM;IAQf,MAAM,IAAI,aAAa;IASvB,OAAO,IAAI,MAAM;IAIjB,SAAS,IAAI,MAAM;CAGpB"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DivideUnit = void 0;
|
|
4
|
+
const numberNode_1 = require("../../tree/nodes/numbers/numberNode");
|
|
5
|
+
const multiplyNode_1 = require("../../tree/nodes/operators/multiplyNode");
|
|
6
|
+
const powerNode_1 = require("../../tree/nodes/operators/powerNode");
|
|
7
|
+
class DivideUnit {
|
|
8
|
+
constructor(leftChild, rightChild) {
|
|
9
|
+
this.leftChild = leftChild;
|
|
10
|
+
this.rightChild = rightChild;
|
|
11
|
+
this.unit = leftChild.getUnit() + "/" + rightChild.getUnit();
|
|
12
|
+
}
|
|
13
|
+
toTex() {
|
|
14
|
+
const resultTree = this.toTree().simplify({ keepPowers: true });
|
|
15
|
+
if ((0, numberNode_1.isNumberNode)(resultTree) && resultTree.value === 1) {
|
|
16
|
+
return "";
|
|
17
|
+
}
|
|
18
|
+
return resultTree.toTex({ forceDotSign: true });
|
|
19
|
+
}
|
|
20
|
+
toTree() {
|
|
21
|
+
return new multiplyNode_1.MultiplyNode(this.leftChild.toTree(), new powerNode_1.PowerNode(this.rightChild.toTree(), (-1).toTree()).simplify({
|
|
22
|
+
keepPowers: true,
|
|
23
|
+
}));
|
|
24
|
+
}
|
|
25
|
+
getUnit() {
|
|
26
|
+
return this.unit;
|
|
27
|
+
}
|
|
28
|
+
className() {
|
|
29
|
+
return "DivideUnit";
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.DivideUnit = DivideUnit;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BaseTenUnit } from "./interfaces/baseTenUnit";
|
|
2
|
+
import { Unit } from "./interfaces/unit";
|
|
3
|
+
type electricalChargeValues = "kC" | "hC" | "daC" | "C" | "dC" | "cC" | "mC";
|
|
4
|
+
export declare class ElectricalChargeUnit extends BaseTenUnit<electricalChargeValues> {
|
|
5
|
+
static readonly kC: ElectricalChargeUnit;
|
|
6
|
+
static readonly hC: ElectricalChargeUnit;
|
|
7
|
+
static readonly daC: ElectricalChargeUnit;
|
|
8
|
+
static readonly C: ElectricalChargeUnit;
|
|
9
|
+
static readonly dC: ElectricalChargeUnit;
|
|
10
|
+
static readonly cC: ElectricalChargeUnit;
|
|
11
|
+
static readonly mC: ElectricalChargeUnit;
|
|
12
|
+
className(): string;
|
|
13
|
+
getUnitsValues(): string[];
|
|
14
|
+
getUnitsObjects(): Unit<electricalChargeValues>[];
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=electricalChargeUnit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"electricalChargeUnit.d.ts","sourceRoot":"","sources":["../../../src/pc/units/electricalChargeUnit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,KAAK,sBAAsB,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,GAAG,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAY7E,qBAAa,oBAAqB,SAAQ,WAAW,CAAC,sBAAsB,CAAC;IAC3E,MAAM,CAAC,QAAQ,CAAC,EAAE,uBAAkC;IACpD,MAAM,CAAC,QAAQ,CAAC,EAAE,uBAAkC;IACpD,MAAM,CAAC,QAAQ,CAAC,GAAG,uBAAmC;IACtD,MAAM,CAAC,QAAQ,CAAC,CAAC,uBAAiC;IAClD,MAAM,CAAC,QAAQ,CAAC,EAAE,uBAAkC;IACpD,MAAM,CAAC,QAAQ,CAAC,EAAE,uBAAkC;IACpD,MAAM,CAAC,QAAQ,CAAC,EAAE,uBAAkC;IAEpD,SAAS,IAAI,MAAM;IAGnB,cAAc,IAAI,MAAM,EAAE;IAG1B,eAAe,IAAI,IAAI,CAAC,sBAAsB,CAAC,EAAE;CAWlD"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ElectricalChargeUnit = void 0;
|
|
4
|
+
const baseTenUnit_1 = require("./interfaces/baseTenUnit");
|
|
5
|
+
const mass = [
|
|
6
|
+
"kC",
|
|
7
|
+
"hC",
|
|
8
|
+
"daC",
|
|
9
|
+
"C",
|
|
10
|
+
"dC",
|
|
11
|
+
"cC",
|
|
12
|
+
"mC",
|
|
13
|
+
];
|
|
14
|
+
class ElectricalChargeUnit extends baseTenUnit_1.BaseTenUnit {
|
|
15
|
+
className() {
|
|
16
|
+
return "ElectricalChargeUnit";
|
|
17
|
+
}
|
|
18
|
+
getUnitsValues() {
|
|
19
|
+
return mass;
|
|
20
|
+
}
|
|
21
|
+
getUnitsObjects() {
|
|
22
|
+
return [
|
|
23
|
+
ElectricalChargeUnit.kC,
|
|
24
|
+
ElectricalChargeUnit.hC,
|
|
25
|
+
ElectricalChargeUnit.daC,
|
|
26
|
+
ElectricalChargeUnit.C,
|
|
27
|
+
ElectricalChargeUnit.dC,
|
|
28
|
+
ElectricalChargeUnit.cC,
|
|
29
|
+
ElectricalChargeUnit.mC,
|
|
30
|
+
];
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.ElectricalChargeUnit = ElectricalChargeUnit;
|
|
34
|
+
ElectricalChargeUnit.kC = new ElectricalChargeUnit("kC");
|
|
35
|
+
ElectricalChargeUnit.hC = new ElectricalChargeUnit("hC");
|
|
36
|
+
ElectricalChargeUnit.daC = new ElectricalChargeUnit("daC");
|
|
37
|
+
ElectricalChargeUnit.C = new ElectricalChargeUnit("C");
|
|
38
|
+
ElectricalChargeUnit.dC = new ElectricalChargeUnit("dC");
|
|
39
|
+
ElectricalChargeUnit.cC = new ElectricalChargeUnit("cg");
|
|
40
|
+
ElectricalChargeUnit.mC = new ElectricalChargeUnit("mC");
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BaseTenUnit } from "./interfaces/baseTenUnit";
|
|
2
|
+
import { Unit } from "./interfaces/unit";
|
|
3
|
+
type ohmValues = "kΩ" | "hΩ" | "daΩ" | "Ω" | "dΩ" | "cΩ" | "mΩ";
|
|
4
|
+
declare const ohmValues: ohmValues[];
|
|
5
|
+
export declare class ElectricalResistanceUnit extends BaseTenUnit<ohmValues> {
|
|
6
|
+
static readonly kΩ: ElectricalResistanceUnit;
|
|
7
|
+
static readonly hΩ: ElectricalResistanceUnit;
|
|
8
|
+
static readonly daΩ: ElectricalResistanceUnit;
|
|
9
|
+
static readonly Ω: ElectricalResistanceUnit;
|
|
10
|
+
static readonly dΩ: ElectricalResistanceUnit;
|
|
11
|
+
static readonly cΩ: ElectricalResistanceUnit;
|
|
12
|
+
static readonly mΩ: ElectricalResistanceUnit;
|
|
13
|
+
className(): string;
|
|
14
|
+
getUnitsValues(): string[];
|
|
15
|
+
getUnitsObjects(): Unit<ohmValues>[];
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=electricalResistanceUnit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"electricalResistanceUnit.d.ts","sourceRoot":"","sources":["../../../src/pc/units/electricalResistanceUnit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,KAAK,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,GAAG,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEhE,QAAA,MAAM,SAAS,EAAE,SAAS,EAA+C,CAAC;AAE1E,qBAAa,wBAAyB,SAAQ,WAAW,CAAC,SAAS,CAAC;IAClE,MAAM,CAAC,QAAQ,CAAC,EAAE,2BAAsC;IACxD,MAAM,CAAC,QAAQ,CAAC,EAAE,2BAAsC;IACxD,MAAM,CAAC,QAAQ,CAAC,GAAG,2BAAuC;IAC1D,MAAM,CAAC,QAAQ,CAAC,CAAC,2BAAqC;IACtD,MAAM,CAAC,QAAQ,CAAC,EAAE,2BAAsC;IACxD,MAAM,CAAC,QAAQ,CAAC,EAAE,2BAAsC;IACxD,MAAM,CAAC,QAAQ,CAAC,EAAE,2BAAsC;IAExD,SAAS,IAAI,MAAM;IAGnB,cAAc,IAAI,MAAM,EAAE;IAG1B,eAAe,IAAI,IAAI,CAAC,SAAS,CAAC,EAAE;CAWrC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ElectricalResistanceUnit = void 0;
|
|
4
|
+
const baseTenUnit_1 = require("./interfaces/baseTenUnit");
|
|
5
|
+
const ohmValues = ["kΩ", "hΩ", "daΩ", "Ω", "dΩ", "cΩ", "mΩ"];
|
|
6
|
+
class ElectricalResistanceUnit extends baseTenUnit_1.BaseTenUnit {
|
|
7
|
+
className() {
|
|
8
|
+
return "ElectricalResistanceUnit";
|
|
9
|
+
}
|
|
10
|
+
getUnitsValues() {
|
|
11
|
+
return ohmValues;
|
|
12
|
+
}
|
|
13
|
+
getUnitsObjects() {
|
|
14
|
+
return [
|
|
15
|
+
ElectricalResistanceUnit.kΩ,
|
|
16
|
+
ElectricalResistanceUnit.hΩ,
|
|
17
|
+
ElectricalResistanceUnit.daΩ,
|
|
18
|
+
ElectricalResistanceUnit.Ω,
|
|
19
|
+
ElectricalResistanceUnit.dΩ,
|
|
20
|
+
ElectricalResistanceUnit.cΩ,
|
|
21
|
+
ElectricalResistanceUnit.mΩ,
|
|
22
|
+
];
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.ElectricalResistanceUnit = ElectricalResistanceUnit;
|
|
26
|
+
ElectricalResistanceUnit.kΩ = new ElectricalResistanceUnit("kΩ");
|
|
27
|
+
ElectricalResistanceUnit.hΩ = new ElectricalResistanceUnit("hΩ");
|
|
28
|
+
ElectricalResistanceUnit.daΩ = new ElectricalResistanceUnit("daΩ");
|
|
29
|
+
ElectricalResistanceUnit.Ω = new ElectricalResistanceUnit("Ω");
|
|
30
|
+
ElectricalResistanceUnit.dΩ = new ElectricalResistanceUnit("dΩ");
|
|
31
|
+
ElectricalResistanceUnit.cΩ = new ElectricalResistanceUnit("cΩ");
|
|
32
|
+
ElectricalResistanceUnit.mΩ = new ElectricalResistanceUnit("mΩ");
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BaseTenUnit } from "./interfaces/baseTenUnit";
|
|
2
|
+
import { Unit } from "./interfaces/unit";
|
|
3
|
+
type amperValues = "kA" | "hA" | "daA" | "A" | "dA" | "cA" | "mA";
|
|
4
|
+
declare const amperValues: amperValues[];
|
|
5
|
+
export declare class ElectricalUnit extends BaseTenUnit<amperValues> {
|
|
6
|
+
static readonly kA: ElectricalUnit;
|
|
7
|
+
static readonly hA: ElectricalUnit;
|
|
8
|
+
static readonly daA: ElectricalUnit;
|
|
9
|
+
static readonly A: ElectricalUnit;
|
|
10
|
+
static readonly dA: ElectricalUnit;
|
|
11
|
+
static readonly cA: ElectricalUnit;
|
|
12
|
+
static readonly mA: ElectricalUnit;
|
|
13
|
+
className(): string;
|
|
14
|
+
getUnitsValues(): string[];
|
|
15
|
+
getUnitsObjects(): Unit<amperValues>[];
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=electricalUnit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"electricalUnit.d.ts","sourceRoot":"","sources":["../../../src/pc/units/electricalUnit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,KAAK,WAAW,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,GAAG,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAElE,QAAA,MAAM,WAAW,EAAE,WAAW,EAA+C,CAAC;AAE9E,qBAAa,cAAe,SAAQ,WAAW,CAAC,WAAW,CAAC;IAC1D,MAAM,CAAC,QAAQ,CAAC,EAAE,iBAA4B;IAC9C,MAAM,CAAC,QAAQ,CAAC,EAAE,iBAA4B;IAC9C,MAAM,CAAC,QAAQ,CAAC,GAAG,iBAA6B;IAChD,MAAM,CAAC,QAAQ,CAAC,CAAC,iBAA2B;IAC5C,MAAM,CAAC,QAAQ,CAAC,EAAE,iBAA4B;IAC9C,MAAM,CAAC,QAAQ,CAAC,EAAE,iBAA4B;IAC9C,MAAM,CAAC,QAAQ,CAAC,EAAE,iBAA4B;IAE9C,SAAS,IAAI,MAAM;IAGnB,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.ElectricalUnit = void 0;
|
|
4
|
+
const baseTenUnit_1 = require("./interfaces/baseTenUnit");
|
|
5
|
+
const amperValues = ["kA", "hA", "daA", "A", "dA", "cA", "mA"];
|
|
6
|
+
class ElectricalUnit extends baseTenUnit_1.BaseTenUnit {
|
|
7
|
+
className() {
|
|
8
|
+
return "ElectricalUnit";
|
|
9
|
+
}
|
|
10
|
+
getUnitsValues() {
|
|
11
|
+
return amperValues;
|
|
12
|
+
}
|
|
13
|
+
getUnitsObjects() {
|
|
14
|
+
return [
|
|
15
|
+
ElectricalUnit.kA,
|
|
16
|
+
ElectricalUnit.hA,
|
|
17
|
+
ElectricalUnit.daA,
|
|
18
|
+
ElectricalUnit.A,
|
|
19
|
+
ElectricalUnit.dA,
|
|
20
|
+
ElectricalUnit.cA,
|
|
21
|
+
ElectricalUnit.mA,
|
|
22
|
+
];
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.ElectricalUnit = ElectricalUnit;
|
|
26
|
+
ElectricalUnit.kA = new ElectricalUnit("kA");
|
|
27
|
+
ElectricalUnit.hA = new ElectricalUnit("hA");
|
|
28
|
+
ElectricalUnit.daA = new ElectricalUnit("daA");
|
|
29
|
+
ElectricalUnit.A = new ElectricalUnit("A");
|
|
30
|
+
ElectricalUnit.dA = new ElectricalUnit("dA");
|
|
31
|
+
ElectricalUnit.cA = new ElectricalUnit("cA");
|
|
32
|
+
ElectricalUnit.mA = new ElectricalUnit("mA");
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Unit } from "./interfaces/unit";
|
|
2
|
+
import { BaseTenUnit } from "./interfaces/baseTenUnit";
|
|
3
|
+
export type energyValues = "kJ" | "hJ" | "daJ" | "J" | "dJ" | "cJ" | "mJ";
|
|
4
|
+
export declare class EnergyUnit extends BaseTenUnit<energyValues> {
|
|
5
|
+
static readonly kJ: EnergyUnit;
|
|
6
|
+
static readonly hJ: EnergyUnit;
|
|
7
|
+
static readonly daJ: EnergyUnit;
|
|
8
|
+
static readonly J: EnergyUnit;
|
|
9
|
+
static readonly dJ: EnergyUnit;
|
|
10
|
+
static readonly cJ: EnergyUnit;
|
|
11
|
+
static readonly mJ: EnergyUnit;
|
|
12
|
+
className(): string;
|
|
13
|
+
getUnitsValues(): string[];
|
|
14
|
+
getUnitsObjects(): Unit<energyValues>[];
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=energyUnit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"energyUnit.d.ts","sourceRoot":"","sources":["../../../src/pc/units/energyUnit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,GAAG,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAG1E,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;IAG1B,eAAe,IAAI,IAAI,CAAC,YAAY,CAAC,EAAE;CAWxC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EnergyUnit = void 0;
|
|
4
|
+
const baseTenUnit_1 = require("./interfaces/baseTenUnit");
|
|
5
|
+
const energys = ["kJ", "hJ", "daJ", "J", "dJ", "cJ", "mJ"];
|
|
6
|
+
class EnergyUnit extends baseTenUnit_1.BaseTenUnit {
|
|
7
|
+
className() {
|
|
8
|
+
return "EnergyUnit";
|
|
9
|
+
}
|
|
10
|
+
getUnitsValues() {
|
|
11
|
+
return energys;
|
|
12
|
+
}
|
|
13
|
+
getUnitsObjects() {
|
|
14
|
+
return [
|
|
15
|
+
EnergyUnit.kJ,
|
|
16
|
+
EnergyUnit.hJ,
|
|
17
|
+
EnergyUnit.daJ,
|
|
18
|
+
EnergyUnit.J,
|
|
19
|
+
EnergyUnit.dJ,
|
|
20
|
+
EnergyUnit.cJ,
|
|
21
|
+
EnergyUnit.mJ,
|
|
22
|
+
];
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.EnergyUnit = EnergyUnit;
|
|
26
|
+
EnergyUnit.kJ = new EnergyUnit("kJ");
|
|
27
|
+
EnergyUnit.hJ = new EnergyUnit("hJ");
|
|
28
|
+
EnergyUnit.daJ = new EnergyUnit("daJ");
|
|
29
|
+
EnergyUnit.J = new EnergyUnit("J");
|
|
30
|
+
EnergyUnit.dJ = new EnergyUnit("dJ");
|
|
31
|
+
EnergyUnit.cJ = new EnergyUnit("cJ");
|
|
32
|
+
EnergyUnit.mJ = new EnergyUnit("mJ");
|