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