20 public string Name =>
"Temperature";
33 private static readonly
Unit reference =
new Unit(referenceUnit);
61 public bool ToReferenceUnit(ref
double Magnitude, ref
double NrDecimals,
string BaseUnit,
int Exponent)
74 Magnitude = (Magnitude - 32) / 1.8 + 273.15;
75 NrDecimals += log10_1p8;
86 private static readonly
double log10_1p8 = Math.Log10(1.8);
96 public bool FromReferenceUnit(ref
double Magnitude, ref
double NrDecimals,
string BaseUnit,
int Exponent)
109 Magnitude = (Magnitude - 273.15) * 1.8 + 32;
110 NrDecimals -= log10_1p8;
Represents an atomic unit.
A temperature is an objective comparative measure of hot or cold.
string Name
Name of base quantity.
AtomicUnit ReferenceUnit
Reference unit of base quantity.
bool ToReferenceUnit(ref double Magnitude, ref double NrDecimals, string BaseUnit, int Exponent)
Tries to convert a magnitude from a specified base unit, to the reference unit.
string[] BaseUnits
Base Units supported.
bool FromReferenceUnit(ref double Magnitude, ref double NrDecimals, string BaseUnit, int Exponent)
Tries to convert a magnitude to a specified base unit, from the reference unit.
Unit Reference
Reference unit of category.
Temperature()
A temperature is an objective comparative measure of hot or cold.
Interface for physical base quantities