public void ConversionRoundTrip()
        {
            ReactivePower voltamperereactive = ReactivePower.FromVoltamperesReactive(1);

            AssertEx.EqualTolerance(1, ReactivePower.FromGigavoltamperesReactive(voltamperereactive.GigavoltamperesReactive).VoltamperesReactive, GigavoltamperesReactiveTolerance);
            AssertEx.EqualTolerance(1, ReactivePower.FromKilovoltamperesReactive(voltamperereactive.KilovoltamperesReactive).VoltamperesReactive, KilovoltamperesReactiveTolerance);
            AssertEx.EqualTolerance(1, ReactivePower.FromMegavoltamperesReactive(voltamperereactive.MegavoltamperesReactive).VoltamperesReactive, MegavoltamperesReactiveTolerance);
            AssertEx.EqualTolerance(1, ReactivePower.FromVoltamperesReactive(voltamperereactive.VoltamperesReactive).VoltamperesReactive, VoltamperesReactiveTolerance);
        }
 /// <inheritdoc cref="ReactivePower.FromKilovoltamperesReactive(double?)"/>
 public static ReactivePower?KilovoltamperesReactive(this decimal?value) => ReactivePower.FromKilovoltamperesReactive(value == null ? (double?)null : Convert.ToDouble(value.Value));
 /// <inheritdoc cref="ReactivePower.FromKilovoltamperesReactive(double)"/>
 public static ReactivePower KilovoltamperesReactive(this decimal value) => ReactivePower.FromKilovoltamperesReactive(Convert.ToDouble(value));
 /// <inheritdoc cref="ReactivePower.FromKilovoltamperesReactive(double?)"/>
 public static ReactivePower?KilovoltamperesReactive(this float?value) => ReactivePower.FromKilovoltamperesReactive(value);
 /// <inheritdoc cref="ReactivePower.FromKilovoltamperesReactive(double)"/>
 public static ReactivePower KilovoltamperesReactive(this double value) => ReactivePower.FromKilovoltamperesReactive(value);
Esempio n. 6
0
 public void NumberToKilovoltamperesReactiveTest() =>
 Assert.Equal(ReactivePower.FromKilovoltamperesReactive(2), 2.KilovoltamperesReactive());
Esempio n. 7
0
 public static ReactivePower?KilovoltamperesReactive <T>(this T?value) where T : struct => ReactivePower.FromKilovoltamperesReactive(value == null ? (double?)null : Convert.ToDouble(value.Value));
 public static ReactivePower KilovoltamperesReactive <T>(this T value) =>
 ReactivePower.FromKilovoltamperesReactive(Convert.ToDecimal(value));