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);
        }
Beispiel #2
0
 public void NumberToMicrovoltsAcTest() =>
 Assert.Equal(ElectricPotentialAc.FromMicrovoltsAc(2), 2.MicrovoltsAc());
Beispiel #3
0
 /// <inheritdoc cref="ElectricPotentialAc.FromMicrovoltsAc(double?)"/>
 public static ElectricPotentialAc?MicrovoltsAc(this decimal?value) => ElectricPotentialAc.FromMicrovoltsAc(value == null ? (double?)null : Convert.ToDouble(value.Value));
Beispiel #4
0
 /// <inheritdoc cref="ElectricPotentialAc.FromMicrovoltsAc(double)"/>
 public static ElectricPotentialAc MicrovoltsAc(this decimal value) => ElectricPotentialAc.FromMicrovoltsAc(Convert.ToDouble(value));
Beispiel #5
0
 /// <inheritdoc cref="ElectricPotentialAc.FromMicrovoltsAc(double?)"/>
 public static ElectricPotentialAc?MicrovoltsAc(this float?value) => ElectricPotentialAc.FromMicrovoltsAc(value);
Beispiel #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));
Beispiel #8
0
 public static ElectricPotentialAc MicrovoltsAc <T>(this T value) =>
 ElectricPotentialAc.FromMicrovoltsAc(Convert.ToDecimal(value));