示例#1
0
 public override Numeric mulReversed(Numeric x)
 {
     if (!(x is RatNum))
     {
         throw new ArgumentException();
     }
     return(RatNum.times((RatNum)x, this));
 }
示例#2
0
 public override Numeric mul(object y)
 {
     if (y is RatNum)
     {
         return(RatNum.times(this, (RatNum)y));
     }
     if (!(y is Numeric))
     {
         throw new ArgumentException();
     }
     return(((Numeric)y).mulReversed(this));
 }