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