示例#1
0
文件: Unit.cs 项目: hultqvist/lax
 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;
 }
示例#2
0
文件: Unit.cs 项目: hultqvist/lax
 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;
 }