Exemple #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);
        }
Exemple #2
0
 /// <inheritdoc cref="PerTemperature.FromPerDegreesRoemer(double?)"/>
 public static PerTemperature?PerDegreesRoemer(this decimal?value) => PerTemperature.FromPerDegreesRoemer(value == null ? (double?)null : Convert.ToDouble(value.Value));
Exemple #3
0
 /// <inheritdoc cref="PerTemperature.FromPerDegreesRoemer(double?)"/>
 public static PerTemperature?PerDegreesRoemer(this float?value) => PerTemperature.FromPerDegreesRoemer(value);
Exemple #4
0
 /// <inheritdoc cref="PerTemperature.FromPerDegreesRoemer(double)"/>
 public static PerTemperature PerDegreesRoemer(this decimal value) => PerTemperature.FromPerDegreesRoemer(Convert.ToDouble(value));
Exemple #5
0
 /// <inheritdoc cref="PerTemperature.FromPerDegreesRoemer(double)"/>
 public static PerTemperature PerDegreesRoemer(this double value) => PerTemperature.FromPerDegreesRoemer(value);