Esempio n. 1
0
 public override Numeric divReversed(Numeric x)
 {
     if (!(x is RatNum))
     {
         throw new ArgumentException();
     }
     return(RatNum.divide((RatNum)x, this));
 }
Esempio n. 2
0
 public override Numeric div(object y)
 {
     if (y is RatNum)
     {
         return(RatNum.divide(this, (RatNum)y));
     }
     if (!(y is Numeric))
     {
         throw new ArgumentException();
     }
     return(((Numeric)y).divReversed(this));
 }