missing parts from from commit d9d903faea

- also add keV and MeV since these are the units used in practice
This commit is contained in:
donovaly
2019-12-23 22:32:47 +01:00
committed by wwmayer
parent 7dbc309015
commit cd8b63028c
8 changed files with 259 additions and 215 deletions

View File

@@ -264,6 +264,14 @@ QString UnitsSchemaInternal::schemaTranslate(const Quantity &quant, double &fact
unitString = QString::fromLatin1("eV");
factor = 1.602176634e-13;
}
else if (UnitValue < 1.602176634e-7) {
unitString = QString::fromLatin1("keV");
factor = 1.602176634e-10;
}
else if (UnitValue < 1.602176634e-4) {
unitString = QString::fromLatin1("MeV");
factor = 1.602176634e-7;
}
else if (UnitValue < 1e6) {
unitString = QString::fromLatin1("mJ");
factor = 1e3;