#include <QuantityConverter.hpp>
Public Types | |
enum | domain { STND, ABS, REL } |
Enum to allow user to communicate temperature conversion preferences. More... | |
Enum to allow user to communicate temperature conversion preferences.
In STND mode, convertToCelsiusUnits and convertToFahrenheit units assume that temperatures like 273 K and 480 R are absolute temperatures in need of offset, but that quantities with other exponents on K or R, or other base units mixed in, are relative temperature quantities whose values can be transferred directly.
In ABS mode, convertToCelsiusUnits and convertToFahrenheit units assume that all quantities were derived from absolute temperatures, and the offset should be applied accordingly, as in 280 K^3 = (pow(280,1.0/3.0) - 273.15)^3 C^3.
In REL mode, convertToCelsiusUnits and convertToFahrenheit units assume that all temperatures are relative, such that values can be transferred directly, i.e., 2 K = 2 C.
When converting Celsius and Fahrenheit to other units, either ABS or REL mode is used, depending on the value of q.isAbsolute().
Enumerator | |
---|---|
STND | |
ABS | |
REL |