Exemplo n.º 1
0
 public override bool Equals(Value other)
 {
     if (other is IntegralValue)
     {
         IntegralValue that = ( IntegralValue )other;
         return(this.LongValue() == that.LongValue());
     }
     else if (other is FloatingPointValue)
     {
         FloatingPointValue that = ( FloatingPointValue )other;
         return(NumberValues.NumbersEqual(that.DoubleValue(), this.LongValue()));
     }
     else
     {
         return(false);
     }
 }
Exemplo n.º 2
0
 public override int CompareTo(FloatingPointValue other)
 {
     return(NumberValues.CompareLongAgainstDouble(LongValue(), other.DoubleValue()));
 }
Exemplo n.º 3
0
 public override int CompareTo(FloatingPointValue other)
 {
     return(DoubleValue().CompareTo(other.DoubleValue()));
 }