Many, many more comments

This commit is contained in:
2024-12-04 17:15:04 +01:00
parent 8696517336
commit 03854339ca
100 changed files with 1702 additions and 49 deletions
+11
View File
@@ -5,15 +5,26 @@
namespace unitConvertion {
// transforms the value from current lenght unit "unit_from" to "unit_to"
// possible values for both "unit_from" and "unit_to": "mm", "cm", "m" otherwise
// an error is thrown and the program terminates
double length(double value,
const std::string& unit_from,
const std::string& unit_to);
// returns the value of unit/meter, supports "mm", "cm", "m" for any other value
// an error is thrown and the program terminates
double lengthPrefactor(const std::string& unit);
// transforms the value from current energy unit "unit_from" to "unit_to"
// possible values for both "unit_from" and "unit_to": "eV", "J" otherwise
// an error is thrown and the program terminates
double energy(double value,
const std::string& unit_from,
const std::string& unit_to);
// returns the value of unit/eV, supports "eV", "J" for any other value
// an error is thrown and the program terminates
double energyPrefactor(const std::string& unit);
}; // namespace unitConvertion