Exemple #1
0
 public static Unit operator /(Unit a, Unit b)
 {
     var c = new Unit();
     foreach (var e in a.Exponent)
         c.AddExponent(e.Key, e.Value); //Above the division
     foreach (var e in b.Exponent)
         c.AddExponent(e.Key, -e.Value);//Below the division
     return c;
 }
Exemple #2
0
 public static Unit operator *(Unit a, Unit b)
 {
     var c = new Unit();
     foreach (var e in a.Exponent)
         c.AddExponent(e.Key, e.Value);
     foreach (var e in b.Exponent)
         c.AddExponent(e.Key, e.Value);
     return c;
 }