예제 #1
0
        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());
예제 #3
0
 /// <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);
예제 #7
0
 public static MassFlux?GramsPerSecondPerSquareMeter <T>(this T?value) where T : struct => MassFlux.FromGramsPerSecondPerSquareMeter(value == null ? (double?)null : Convert.ToDouble(value.Value));