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());
/// <inheritdoc cref="PressureChangeRate.FromKilopascalsPerSecond(double?)"/> public static PressureChangeRate?KilopascalsPerSecond(this double?value) => PressureChangeRate.FromKilopascalsPerSecond(value);
/// <inheritdoc cref="PressureChangeRate.FromKilopascalsPerSecond(double)"/> public static PressureChangeRate KilopascalsPerSecond(this long value) => PressureChangeRate.FromKilopascalsPerSecond(value);
/// <inheritdoc cref="PressureChangeRate.FromKilopascalsPerSecond(double?)"/> public static PressureChangeRate?KilopascalsPerSecond(this decimal?value) => PressureChangeRate.FromKilopascalsPerSecond(value == null ? (double?)null : Convert.ToDouble(value.Value));
/// <inheritdoc cref="PressureChangeRate.FromKilopascalsPerSecond(double)"/> public static PressureChangeRate KilopascalsPerSecond(this decimal value) => PressureChangeRate.FromKilopascalsPerSecond(Convert.ToDouble(value));
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));