Exemplo n.º 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 NumberToMegapascalsPerSecondTest() =>
 Assert.Equal(PressureChangeRate.FromMegapascalsPerSecond(2), 2.MegapascalsPerSecond());
Exemplo n.º 3
0
 /// <inheritdoc cref="PressureChangeRate.FromMegapascalsPerSecond(double?)"/>
 public static PressureChangeRate?MegapascalsPerSecond(this decimal?value) => PressureChangeRate.FromMegapascalsPerSecond(value == null ? (double?)null : Convert.ToDouble(value.Value));
Exemplo n.º 4
0
 /// <inheritdoc cref="PressureChangeRate.FromMegapascalsPerSecond(double)"/>
 public static PressureChangeRate MegapascalsPerSecond(this decimal value) => PressureChangeRate.FromMegapascalsPerSecond(Convert.ToDouble(value));
Exemplo n.º 5
0
 /// <inheritdoc cref="PressureChangeRate.FromMegapascalsPerSecond(double?)"/>
 public static PressureChangeRate?MegapascalsPerSecond(this float?value) => PressureChangeRate.FromMegapascalsPerSecond(value);
Exemplo n.º 6
0
 /// <inheritdoc cref="PressureChangeRate.FromMegapascalsPerSecond(double)"/>
 public static PressureChangeRate MegapascalsPerSecond(this double value) => PressureChangeRate.FromMegapascalsPerSecond(value);
Exemplo n.º 7
0
 public static PressureChangeRate MegapascalsPerSecond <T>(this T value) =>
 PressureChangeRate.FromMegapascalsPerSecond(Convert.ToDecimal(value));
 public static PressureChangeRate?MegapascalsPerSecond <T>(this T?value) where T : struct => PressureChangeRate.FromMegapascalsPerSecond(value == null ? (double?)null : Convert.ToDouble(value.Value));