Beispiel #1
0
        public void ConversionRoundTrip()
        {
            ApparentPower voltampere = ApparentPower.FromVoltamperes(1);

            AssertEx.EqualTolerance(1, ApparentPower.FromKilovoltamperes(voltampere.Kilovoltamperes).Voltamperes, KilovoltamperesTolerance);
            AssertEx.EqualTolerance(1, ApparentPower.FromMegavoltamperes(voltampere.Megavoltamperes).Voltamperes, MegavoltamperesTolerance);
            AssertEx.EqualTolerance(1, ApparentPower.FromVoltamperes(voltampere.Voltamperes).Voltamperes, VoltamperesTolerance);
        }
Beispiel #2
0
 /// <inheritdoc cref="ApparentPower.FromMegavoltamperes(UnitsNet.QuantityValue)" />
 public static ApparentPower?Megavoltamperes(this decimal?value) => ApparentPower.FromMegavoltamperes(value == null ? (double?)null : Convert.ToDouble(value.Value));
Beispiel #3
0
 /// <inheritdoc cref="ApparentPower.FromMegavoltamperes(UnitsNet.QuantityValue)" />
 public static ApparentPower Megavoltamperes(this decimal value) => ApparentPower.FromMegavoltamperes(Convert.ToDouble(value));
Beispiel #4
0
 /// <inheritdoc cref="ApparentPower.FromMegavoltamperes(UnitsNet.QuantityValue)" />
 public static ApparentPower?Megavoltamperes(this float?value) => ApparentPower.FromMegavoltamperes(value);
Beispiel #5
0
 /// <inheritdoc cref="ApparentPower.FromMegavoltamperes(UnitsNet.QuantityValue)" />
 public static ApparentPower Megavoltamperes(this double value) => ApparentPower.FromMegavoltamperes(value);
Beispiel #6
0
 public static ApparentPower Megavoltamperes <T>(this T value) =>
 ApparentPower.FromMegavoltamperes(Convert.ToDecimal(value));
Beispiel #7
0
 public void NumberToMegavoltamperesTest() =>
 Assert.Equal(ApparentPower.FromMegavoltamperes(2), 2.Megavoltamperes());
 public static ApparentPower?Megavoltamperes <T>(this T?value) where T : struct => ApparentPower.FromMegavoltamperes(value == null ? (double?)null : Convert.ToDouble(value.Value));