예제 #1
0
        public override bool Equals(Object obj)
        {
            if (this == obj)
            {
                return(true);
            }
            if (obj == null)
            {
                return(false);
            }
            //if (getClass() != obj.getClass())
            //return false;
            RationalLarge other = (RationalLarge)obj;

            if (den != other.den)
            {
                return(false);
            }
            if (num != other.num)
            {
                return(false);
            }
            return(true);
        }
예제 #2
0
 public RationalLarge divideBy(RationalLarge other)
 {
     return(RationalLarge.reduce(num * other.den, den * other.num));
 }
예제 #3
0
 public RationalLarge divide(RationalLarge other)
 {
     return(RationalLarge.reduce(other.num * den, other.den * num));
 }
예제 #4
0
 public RationalLarge multiply(RationalLarge other)
 {
     return(RationalLarge.reduce(num * other.num, den * other.den));
 }
예제 #5
0
 public RationalLarge minus(RationalLarge other)
 {
     return(RationalLarge.reduce(num * other.den - other.num * den, den * other.den));
 }
예제 #6
0
 public Rational plus(Rational other)
 {
     return(RationalLarge.reduce(num * other.den + other.num * den, den * other.den));
 }
예제 #7
0
 public RationalLarge getPtsR()
 {
     return(RationalLarge.R(pts, timescale));
 }
예제 #8
0
 public bool equals(RationalLarge other)
 {
     return(num * other.den == other.num * den);
 }
예제 #9
0
 public bool greaterOrEqualTo(RationalLarge sec)
 {
     return(num * sec.den >= sec.num * den);
 }
예제 #10
0
 public bool smallerOrEqualTo(RationalLarge sec)
 {
     return(num * sec.den <= sec.num * den);
 }
예제 #11
0
 public bool greaterThen(RationalLarge sec)
 {
     return(num * sec.den > sec.num * den);
 }
예제 #12
0
 public bool lessThen(RationalLarge sec)
 {
     return(num * sec.den < sec.num * den);
 }