コード例 #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);
     }
 }
コード例 #2
0
 public override int CompareTo(FloatingPointValue other)
 {
     return(NumberValues.CompareLongAgainstDouble(LongValue(), other.DoubleValue()));
 }
コード例 #3
0
 public override int CompareTo(FloatingPointValue other)
 {
     return(DoubleValue().CompareTo(other.DoubleValue()));
 }