示例#1
0
        public void ConversionRoundTrip()
        {
            ReactivePower voltamperereactive = ReactivePower.FromVoltamperesReactive(1);

            AssertEx.EqualTolerance(1, ReactivePower.FromCentivoltamperesReactive(voltamperereactive.CentivoltamperesReactive).VoltamperesReactive, CentivoltamperesReactiveTolerance);
            AssertEx.EqualTolerance(1, ReactivePower.FromDecavoltamperesReactive(voltamperereactive.DecavoltamperesReactive).VoltamperesReactive, DecavoltamperesReactiveTolerance);
            AssertEx.EqualTolerance(1, ReactivePower.FromDecivoltamperesReactive(voltamperereactive.DecivoltamperesReactive).VoltamperesReactive, DecivoltamperesReactiveTolerance);
            AssertEx.EqualTolerance(1, ReactivePower.FromExavoltamperesReactive(voltamperereactive.ExavoltamperesReactive).VoltamperesReactive, ExavoltamperesReactiveTolerance);
            AssertEx.EqualTolerance(1, ReactivePower.FromFemtovoltamperesReactive(voltamperereactive.FemtovoltamperesReactive).VoltamperesReactive, FemtovoltamperesReactiveTolerance);
            AssertEx.EqualTolerance(1, ReactivePower.FromGigavoltamperesReactive(voltamperereactive.GigavoltamperesReactive).VoltamperesReactive, GigavoltamperesReactiveTolerance);
            AssertEx.EqualTolerance(1, ReactivePower.FromHectovoltamperesReactive(voltamperereactive.HectovoltamperesReactive).VoltamperesReactive, HectovoltamperesReactiveTolerance);
            AssertEx.EqualTolerance(1, ReactivePower.FromKilovoltamperesReactive(voltamperereactive.KilovoltamperesReactive).VoltamperesReactive, KilovoltamperesReactiveTolerance);
            AssertEx.EqualTolerance(1, ReactivePower.FromMegavoltamperesReactive(voltamperereactive.MegavoltamperesReactive).VoltamperesReactive, MegavoltamperesReactiveTolerance);
            AssertEx.EqualTolerance(1, ReactivePower.FromMicrovoltamperesReactive(voltamperereactive.MicrovoltamperesReactive).VoltamperesReactive, MicrovoltamperesReactiveTolerance);
            AssertEx.EqualTolerance(1, ReactivePower.FromMillivoltamperesReactive(voltamperereactive.MillivoltamperesReactive).VoltamperesReactive, MillivoltamperesReactiveTolerance);
            AssertEx.EqualTolerance(1, ReactivePower.FromNanovoltamperesReactive(voltamperereactive.NanovoltamperesReactive).VoltamperesReactive, NanovoltamperesReactiveTolerance);
            AssertEx.EqualTolerance(1, ReactivePower.FromPetavoltamperesReactive(voltamperereactive.PetavoltamperesReactive).VoltamperesReactive, PetavoltamperesReactiveTolerance);
            AssertEx.EqualTolerance(1, ReactivePower.FromPicovoltamperesReactive(voltamperereactive.PicovoltamperesReactive).VoltamperesReactive, PicovoltamperesReactiveTolerance);
            AssertEx.EqualTolerance(1, ReactivePower.FromQutravoltamperesReactive(voltamperereactive.QutravoltamperesReactive).VoltamperesReactive, QutravoltamperesReactiveTolerance);
            AssertEx.EqualTolerance(1, ReactivePower.FromTeravoltamperesReactive(voltamperereactive.TeravoltamperesReactive).VoltamperesReactive, TeravoltamperesReactiveTolerance);
            AssertEx.EqualTolerance(1, ReactivePower.FromVettavoltamperesReactive(voltamperereactive.VettavoltamperesReactive).VoltamperesReactive, VettavoltamperesReactiveTolerance);
            AssertEx.EqualTolerance(1, ReactivePower.FromVoltamperesReactive(voltamperereactive.VoltamperesReactive).VoltamperesReactive, VoltamperesReactiveTolerance);
            AssertEx.EqualTolerance(1, ReactivePower.FromYottavoltamperesReactive(voltamperereactive.YottavoltamperesReactive).VoltamperesReactive, YottavoltamperesReactiveTolerance);
            AssertEx.EqualTolerance(1, ReactivePower.FromZettavoltamperesReactive(voltamperereactive.ZettavoltamperesReactive).VoltamperesReactive, ZettavoltamperesReactiveTolerance);
        }
        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);
        }
示例#3
0
 /// <inheritdoc cref="ReactivePower.FromGigavoltamperesReactive(double?)"/>
 public static ReactivePower?GigavoltamperesReactive(this decimal?value) => ReactivePower.FromGigavoltamperesReactive(value == null ? (double?)null : Convert.ToDouble(value.Value));
示例#4
0
 /// <inheritdoc cref="ReactivePower.FromGigavoltamperesReactive(double)"/>
 public static ReactivePower GigavoltamperesReactive(this decimal value) => ReactivePower.FromGigavoltamperesReactive(Convert.ToDouble(value));
示例#5
0
 /// <inheritdoc cref="ReactivePower.FromGigavoltamperesReactive(double?)"/>
 public static ReactivePower?GigavoltamperesReactive(this float?value) => ReactivePower.FromGigavoltamperesReactive(value);
示例#6
0
 /// <inheritdoc cref="ReactivePower.FromGigavoltamperesReactive(double)"/>
 public static ReactivePower GigavoltamperesReactive(this double value) => ReactivePower.FromGigavoltamperesReactive(value);
示例#7
0
 public void NumberToGigavoltamperesReactiveTest() =>
 Assert.Equal(ReactivePower.FromGigavoltamperesReactive(2), 2.GigavoltamperesReactive());
示例#8
0
 public static ReactivePower?GigavoltamperesReactive <T>(this T?value) where T : struct => ReactivePower.FromGigavoltamperesReactive(value == null ? (double?)null : Convert.ToDouble(value.Value));
 public static ReactivePower GigavoltamperesReactive <T>(this T value) =>
 ReactivePower.FromGigavoltamperesReactive(Convert.ToDecimal(value));