Beispiel #1
0
        public void ConversionRoundTrip()
        {
            PerTemperature perkelvin = PerTemperature.FromPerKelvins(1);

            Assert.AreEqual(1, PerTemperature.FromPerDegreesCelsius(perkelvin.PerDegreesCelsius).PerKelvins, PerDegreesCelsiusTolerance);
            Assert.AreEqual(1, PerTemperature.FromPerDegreesDelisle(perkelvin.PerDegreesDelisle).PerKelvins, PerDegreesDelisleTolerance);
            Assert.AreEqual(1, PerTemperature.FromPerDegreesFahrenheit(perkelvin.PerDegreesFahrenheit).PerKelvins, PerDegreesFahrenheitTolerance);
            Assert.AreEqual(1, PerTemperature.FromPerDegreesNewton(perkelvin.PerDegreesNewton).PerKelvins, PerDegreesNewtonTolerance);
            Assert.AreEqual(1, PerTemperature.FromPerDegreesRankine(perkelvin.PerDegreesRankine).PerKelvins, PerDegreesRankineTolerance);
            Assert.AreEqual(1, PerTemperature.FromPerDegreesReaumur(perkelvin.PerDegreesReaumur).PerKelvins, PerDegreesReaumurTolerance);
            Assert.AreEqual(1, PerTemperature.FromPerDegreesRoemer(perkelvin.PerDegreesRoemer).PerKelvins, PerDegreesRoemerTolerance);
            Assert.AreEqual(1, PerTemperature.FromPerKelvins(perkelvin.PerKelvins).PerKelvins, PerKelvinsTolerance);
        }
Beispiel #2
0
 /// <inheritdoc cref="PerTemperature.FromPerDegreesDelisle(double?)"/>
 public static PerTemperature?PerDegreesDelisle(this double?value) => PerTemperature.FromPerDegreesDelisle(value);
Beispiel #3
0
 /// <inheritdoc cref="PerTemperature.FromPerDegreesDelisle(double?)"/>
 public static PerTemperature?PerDegreesDelisle(this decimal?value) => PerTemperature.FromPerDegreesDelisle(value == null ? (double?)null : Convert.ToDouble(value.Value));
Beispiel #4
0
 /// <inheritdoc cref="PerTemperature.FromPerDegreesDelisle(double)"/>
 public static PerTemperature PerDegreesDelisle(this long value) => PerTemperature.FromPerDegreesDelisle(value);
Beispiel #5
0
 /// <inheritdoc cref="PerTemperature.FromPerDegreesDelisle(double)"/>
 public static PerTemperature PerDegreesDelisle(this decimal value) => PerTemperature.FromPerDegreesDelisle(Convert.ToDouble(value));