Ejemplo n.º 1
0
        public override Number sum(Number otherNumber)
        {
            if (otherNumber.precedence() > precedence()) return otherNumber.sum(this);

            double other = getOther(otherNumber);

            return new RadianNumber(modulateRadians(value + other));
        }
Ejemplo n.º 2
0
        public override Number sum(Number otherNumber)
        {
            if (otherNumber.precedence() > precedence()) return otherNumber.sum(this);

            double other = getOther(otherNumber);

            return new DoubleNumber(value + other);
        }