예제 #1
0
파일: IntFraction.cs 프로젝트: tspring/ioke
 public override Numeric divReversed(Numeric x)
 {
     if (!(x is RatNum))
     {
         throw new ArgumentException();
     }
     return(RatNum.divide((RatNum)x, this));
 }
예제 #2
0
파일: IntFraction.cs 프로젝트: tspring/ioke
 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));
 }