1
0
mirror of https://github.com/DanilaFe/abacus synced 2026-01-26 00:25:20 +00:00

Format code.

This commit is contained in:
2017-07-30 21:11:32 -07:00
parent 122874b97a
commit 3ce74303ed
39 changed files with 695 additions and 561 deletions

View File

@@ -7,6 +7,7 @@ public interface NumberInterface {
/**
* The maximum precision to which this number operates.
*
* @return the precision.
*/
int getMaxPrecision();
@@ -14,27 +15,34 @@ public interface NumberInterface {
/**
* Multiplies this number by another, returning
* a new number instance.
*
* @param multiplier the multiplier
* @return the result of the multiplication.
*/
NumberInterface multiply(NumberInterface multiplier);
/**
* Divides this number by another, returning
* a new number instance.
*
* @param divisor the divisor
* @return the result of the division.
*/
NumberInterface divide(NumberInterface divisor);
/**
* Adds this number to another, returning
* a new number instance.
*
* @param summand the summand
* @return the result of the summation.
*/
NumberInterface add(NumberInterface summand);
/**
* Subtracts another number from this number,
* a new number instance.
*
* @param subtrahend the subtrahend.
* @return the result of the subtraction.
*/
@@ -43,12 +51,14 @@ public interface NumberInterface {
/**
* Returns a new instance of this number with
* the sign flipped.
*
* @return the new instance.
*/
NumberInterface negate();
/**
* Raises this number to an integer power.
*
* @param exponent the exponent to which to take the number.
* @return the resulting value.
*/
@@ -56,6 +66,7 @@ public interface NumberInterface {
/**
* Compares this number to another.
*
* @param number the number to compare to.
* @return same as Integer.compare();
*/
@@ -63,12 +74,14 @@ public interface NumberInterface {
/**
* Same as Math.signum().
*
* @return 1 if this number is positive, -1 if this number is negative, 0 if this number is 0.
*/
int signum();
/**
* Promotes this class to another number class.
*
* @param toClass the class to promote to.
* @return the resulting new instance.
*/