public void ConversionRoundTrip()
        {
            ElectricPotentialAc voltac = ElectricPotentialAc.FromVoltsAc(1);

            AssertEx.EqualTolerance(1, ElectricPotentialAc.FromKilovoltsAc(voltac.KilovoltsAc).VoltsAc, KilovoltsAcTolerance);
            AssertEx.EqualTolerance(1, ElectricPotentialAc.FromMegavoltsAc(voltac.MegavoltsAc).VoltsAc, MegavoltsAcTolerance);
            AssertEx.EqualTolerance(1, ElectricPotentialAc.FromMicrovoltsAc(voltac.MicrovoltsAc).VoltsAc, MicrovoltsAcTolerance);
            AssertEx.EqualTolerance(1, ElectricPotentialAc.FromMillivoltsAc(voltac.MillivoltsAc).VoltsAc, MillivoltsAcTolerance);
            AssertEx.EqualTolerance(1, ElectricPotentialAc.FromVoltsAc(voltac.VoltsAc).VoltsAc, VoltsAcTolerance);
        }
示例#2
0
 public void NumberToMicrovoltsAcTest() =>
 Assert.Equal(ElectricPotentialAc.FromMicrovoltsAc(2), 2.MicrovoltsAc());
示例#3
0
 /// <inheritdoc cref="ElectricPotentialAc.FromMicrovoltsAc(double?)"/>
 public static ElectricPotentialAc?MicrovoltsAc(this decimal?value) => ElectricPotentialAc.FromMicrovoltsAc(value == null ? (double?)null : Convert.ToDouble(value.Value));
示例#4
0
 /// <inheritdoc cref="ElectricPotentialAc.FromMicrovoltsAc(double)"/>
 public static ElectricPotentialAc MicrovoltsAc(this decimal value) => ElectricPotentialAc.FromMicrovoltsAc(Convert.ToDouble(value));
示例#5
0
 /// <inheritdoc cref="ElectricPotentialAc.FromMicrovoltsAc(double?)"/>
 public static ElectricPotentialAc?MicrovoltsAc(this float?value) => ElectricPotentialAc.FromMicrovoltsAc(value);
示例#6
0
 /// <inheritdoc cref="ElectricPotentialAc.FromMicrovoltsAc(double)"/>
 public static ElectricPotentialAc MicrovoltsAc(this double value) => ElectricPotentialAc.FromMicrovoltsAc(value);
 public static ElectricPotentialAc?MicrovoltsAc <T>(this T?value) where T : struct => ElectricPotentialAc.FromMicrovoltsAc(value == null ? (double?)null : Convert.ToDouble(value.Value));
示例#8
0
 public static ElectricPotentialAc MicrovoltsAc <T>(this T value) =>
 ElectricPotentialAc.FromMicrovoltsAc(Convert.ToDecimal(value));