Example #1
0
 /// <summary>
 /// Multiplies <paramref name="left"/> with <paramref name="right"/>
 /// </summary>
 /// <param name="left">The left value</param>
 /// <param name="right">The right value</param>
 /// <returns>The <see cref="ElectricCharge"/> that is the result from the multiplication.</returns>
 public static ElectricCharge operator *(Time left, Current right)
 {
     return(ElectricCharge.FromCoulombs(left.seconds * right.amperes));
 }
Example #2
0
 public static ElectricCharge operator /(MassFlow left, MagneticFieldStrength right)
 {
     return(ElectricCharge.FromCoulombs(left.kilogramsPerSecond / right.teslas));
 }
 public bool Equals(ElectricCharge other)
 {
     return(this.coulombs.Equals(other.coulombs));
 }
 public bool Equals(ElectricCharge other, ElectricCharge tolerance)
 {
     Ensure.GreaterThan(tolerance.coulombs, 0, nameof(tolerance));
     return(Math.Abs(this.coulombs - other.coulombs) < tolerance.coulombs);
 }
 public static bool TryParse(string text, NumberStyles styles, IFormatProvider provider, out ElectricCharge result)
 {
     return(QuantityParser.TryParse <ElectricChargeUnit, ElectricCharge>(text, From, styles, provider, out result));
 }
 public int CompareTo(ElectricCharge quantity)
 {
     return(this.coulombs.CompareTo(quantity.coulombs));
 }
Example #7
0
 /// <summary>
 /// Divides <paramref name="left"/> by <paramref name="right"/>
 /// </summary>
 /// <param name="left">The left value</param>
 /// <param name="right">The right value</param>
 /// <returns>The <see cref="ElectricCharge"/> that is the result from the division.</returns>
 public static ElectricCharge operator /(Current left, Frequency right)
 {
     return(ElectricCharge.FromCoulombs(left.amperes / right.hertz));
 }
 public static bool TryParse(string text, NumberStyles styles, out ElectricCharge result)
 {
     return(QuantityParser.TryParse <ElectricChargeUnit, ElectricCharge>(text, From, styles, CultureInfo.CurrentCulture, out result));
 }
Example #9
0
 /// <summary>
 /// Multiplies <paramref name="left"/> with <paramref name="right"/>
 /// </summary>
 /// <param name="left">The left value</param>
 /// <param name="right">The right value</param>
 /// <returns>The <see cref="ElectricCharge"/> that is the result from the multiplication.</returns>
 public static ElectricCharge operator *(Capacitance left, Voltage right)
 {
     return(ElectricCharge.FromCoulombs(left.farads * right.volts));
 }
Example #10
0
 public static ElectricCharge operator *(MagneticFlux left, ElectricalConductance right)
 {
     return(ElectricCharge.FromCoulombs(left.webers * right.siemens));
 }
Example #11
0
 public static ElectricCharge operator /(MagneticFlux left, Resistance right)
 {
     return(ElectricCharge.FromCoulombs(left.webers / right.ohms));
 }
 public static ElectricCharge operator *(double left, ElectricChargeUnit right)
 {
     return(ElectricCharge.From(left, right));
 }
Example #13
0
 /// <summary>
 /// Divides <paramref name="left"/> by <paramref name="right"/>
 /// </summary>
 /// <param name="left">The left value</param>
 /// <param name="right">The right value</param>
 /// <returns>The <see cref="ElectricCharge"/> that is the result from the division.</returns>
 public static ElectricCharge operator /(Energy left, Voltage right)
 {
     return(ElectricCharge.FromCoulombs(left.joules / right.volts));
 }