Пример #1
0
        public void ConversionRoundTrip()
        {
            PressureChangeRate pascalpersecond = PressureChangeRate.FromPascalsPerSecond(1);

            AssertEx.EqualTolerance(1, PressureChangeRate.FromAtmospheresPerSecond(pascalpersecond.AtmospheresPerSecond).PascalsPerSecond, AtmospheresPerSecondTolerance);
            AssertEx.EqualTolerance(1, PressureChangeRate.FromKilopascalsPerSecond(pascalpersecond.KilopascalsPerSecond).PascalsPerSecond, KilopascalsPerSecondTolerance);
            AssertEx.EqualTolerance(1, PressureChangeRate.FromMegapascalsPerSecond(pascalpersecond.MegapascalsPerSecond).PascalsPerSecond, MegapascalsPerSecondTolerance);
            AssertEx.EqualTolerance(1, PressureChangeRate.FromPascalsPerSecond(pascalpersecond.PascalsPerSecond).PascalsPerSecond, PascalsPerSecondTolerance);
        }
 public void NumberToKilopascalsPerSecondTest() =>
 Assert.Equal(PressureChangeRate.FromKilopascalsPerSecond(2), 2.KilopascalsPerSecond());
Пример #3
0
 /// <inheritdoc cref="PressureChangeRate.FromKilopascalsPerSecond(double?)"/>
 public static PressureChangeRate?KilopascalsPerSecond(this double?value) => PressureChangeRate.FromKilopascalsPerSecond(value);
Пример #4
0
 /// <inheritdoc cref="PressureChangeRate.FromKilopascalsPerSecond(double)"/>
 public static PressureChangeRate KilopascalsPerSecond(this long value) => PressureChangeRate.FromKilopascalsPerSecond(value);
Пример #5
0
 /// <inheritdoc cref="PressureChangeRate.FromKilopascalsPerSecond(double?)"/>
 public static PressureChangeRate?KilopascalsPerSecond(this decimal?value) => PressureChangeRate.FromKilopascalsPerSecond(value == null ? (double?)null : Convert.ToDouble(value.Value));
Пример #6
0
 /// <inheritdoc cref="PressureChangeRate.FromKilopascalsPerSecond(double)"/>
 public static PressureChangeRate KilopascalsPerSecond(this decimal value) => PressureChangeRate.FromKilopascalsPerSecond(Convert.ToDouble(value));
Пример #7
0
 public static PressureChangeRate KilopascalsPerSecond <T>(this T value) =>
 PressureChangeRate.FromKilopascalsPerSecond(Convert.ToDecimal(value));
 public static PressureChangeRate?KilopascalsPerSecond <T>(this T?value) where T : struct => PressureChangeRate.FromKilopascalsPerSecond(value == null ? (double?)null : Convert.ToDouble(value.Value));