Пример #1
0
 public override bool Equals(Number other)
 {
     if (other == null)
     {
         return(false);
     }
     FloatNumber rhs = Cast(other); return(this.Value == rhs.Value);
 }
Пример #2
0
        private FloatNumber Cast(Number other)
        {
            FloatNumber another = other as FloatNumber;

            if (another == null)
            {
                Number.CompatibilityException(this, other);
            }
            return(another);
        }
Пример #3
0
 public override Number Multiply(Number other)
 {
     FloatNumber rhs = Cast(other); return(new FloatNumber(this.Value * rhs.Value));
 }
Пример #4
0
 public override Number Divide(Number other)
 {
     FloatNumber rhs = Cast(other); return(new FloatNumber(this.Value / rhs.Value));
 }
Пример #5
0
 public override Number Subtract(Number other)
 {
     FloatNumber rhs = Cast(other); return(new FloatNumber(this.Value - rhs.Value));
 }