Exemple #1
0
        public TemperatureDelta(decimal value, TemperatureDeltaUnit selectedUnit) : this()
        {
            Unit = selectedUnit.Unit;
            SetValue(value);

            //Forcing all TemperatureDeltas to stay in kelvin
            ValueLocalUnit = ToTheOutSide(TemperatureDeltaUnit.Kelvin.Unit);
            Unit           = TemperatureDeltaUnit.Kelvin.Unit;
        }
Exemple #2
0
 public TemperatureDelta ToUnit(TemperatureDeltaUnit selectedUnit)
 {
     return(new TemperatureDelta(ToTheOutSide(selectedUnit.Unit), selectedUnit));
 }
Exemple #3
0
 public double As(TemperatureDeltaUnit ReturnInThisUnit) => (double)ToTheOutSide(ReturnInThisUnit.Unit);
Exemple #4
0
 public static TemperatureDelta From(double value, TemperatureDeltaUnit unit) => new TemperatureDelta(value, unit);