public void ConversionRoundTrip() { MassFlux kilogrampersecondpersquaremeter = MassFlux.FromKilogramsPerSecondPerSquareMeter(1); AssertEx.EqualTolerance(1, MassFlux.FromGramsPerSecondPerSquareMeter(kilogrampersecondpersquaremeter.GramsPerSecondPerSquareMeter).KilogramsPerSecondPerSquareMeter, GramsPerSecondPerSquareMeterTolerance); AssertEx.EqualTolerance(1, MassFlux.FromKilogramsPerSecondPerSquareMeter(kilogrampersecondpersquaremeter.KilogramsPerSecondPerSquareMeter).KilogramsPerSecondPerSquareMeter, KilogramsPerSecondPerSquareMeterTolerance); }
public void NumberToGramsPerSecondPerSquareMeterTest() => Assert.Equal(MassFlux.FromGramsPerSecondPerSquareMeter(2), 2.GramsPerSecondPerSquareMeter());
/// <inheritdoc cref="MassFlux.FromGramsPerSecondPerSquareMeter(UnitsNet.QuantityValue)" /> public static MassFlux GramsPerSecondPerSquareMeter <T>(this T value) => MassFlux.FromGramsPerSecondPerSquareMeter(Convert.ToDouble(value));
/// <inheritdoc cref="MassFlux.FromGramsPerSecondPerSquareMeter(double?)"/> public static MassFlux?GramsPerSecondPerSquareMeter(this decimal?value) => MassFlux.FromGramsPerSecondPerSquareMeter(value == null ? (double?)null : Convert.ToDouble(value.Value));
/// <inheritdoc cref="MassFlux.FromGramsPerSecondPerSquareMeter(double?)"/> public static MassFlux?GramsPerSecondPerSquareMeter(this float?value) => MassFlux.FromGramsPerSecondPerSquareMeter(value);
/// <inheritdoc cref="MassFlux.FromGramsPerSecondPerSquareMeter(double)"/> public static MassFlux GramsPerSecondPerSquareMeter(this double value) => MassFlux.FromGramsPerSecondPerSquareMeter(value);
public static MassFlux?GramsPerSecondPerSquareMeter <T>(this T?value) where T : struct => MassFlux.FromGramsPerSecondPerSquareMeter(value == null ? (double?)null : Convert.ToDouble(value.Value));