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

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