21 public string Name =>
"Dimensionless";
34 private static readonly
Unit reference =
new Unit(referenceUnit);
71 public bool ToReferenceUnit(ref
double Magnitude, ref
double NrDecimals,
string BaseUnit,
int Exponent)
84 k = Math.Pow(12, Exponent);
89 k = Math.Pow(144, Exponent);
93 k = Math.Pow(1e-2, Exponent);
98 k = Math.Pow(1e-3, Exponent);
103 k = Math.Pow(1e-4, Exponent);
116 NrDecimals -= Math.Log10(k);
129 public bool FromReferenceUnit(ref
double Magnitude, ref
double NrDecimals,
string BaseUnit,
int Exponent)
131 return this.
ToReferenceUnit(ref Magnitude, ref NrDecimals, BaseUnit, -Exponent);
Degrees to radians operator.
const double Scale
PI / 180
Represents an atomic unit.
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.
Dimensionless()
Dimensionless units.
AtomicUnit ReferenceUnit
Reference unit of category.
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.
string Name
Name of base quantity.
Unit Reference
Reference unit for category.
Interface for physical base quantities