| Package | Description |
|---|---|
| org.sellcom.core.math |
| Modifier and Type | Field | Description |
|---|---|---|
static LongFraction |
LongFraction.ONE |
Fraction of
1/1. |
static LongFraction |
LongFraction.ONE_HALF |
Fraction of
1/2. |
static LongFraction |
LongFraction.ONE_QUARTER |
Fraction of
1/4. |
static LongFraction |
LongFraction.ONE_THIRD |
Fraction of
1/3. |
static LongFraction |
LongFraction.THREE_QUARTERS |
Fraction of
3/4. |
static LongFraction |
LongFraction.TWO_THIRDS |
Fraction of
2/3. |
static LongFraction |
LongFraction.ZERO |
Fraction of
0/1. |
| Modifier and Type | Method | Description |
|---|---|---|
LongFraction |
LongFraction.abs() |
Returns the absolute value of this fraction.
|
LongFraction |
LongFraction.add(long value) |
Returns the sum of this fraction and the given number.
|
LongFraction |
LongFraction.add(LongFraction other) |
Returns the sum of this fraction and the given fraction.
|
LongFraction |
LongFraction.divide(long value) |
Returns the quotient of this fraction and the given number.
|
LongFraction |
LongFraction.divide(LongFraction other) |
Returns the quotient of this fraction and the given fraction.
|
LongFraction |
LongFraction.multiply(long value) |
Returns the product of this fraction and the given number.
|
LongFraction |
LongFraction.multiply(LongFraction other) |
Returns the product of this fraction and the given fraction.
|
LongFraction |
LongFraction.negate() |
Returns the opposite of this fraction.
|
static LongFraction |
LongFraction.parse(java.lang.String text) |
Returns a fraction obtained from the given text string.
|
LongFraction |
LongFraction.pow(int exponent) |
Returns this fraction raised to the power of the given exponent.
|
LongFraction |
LongFraction.reciprocal() |
Return the reciprocal of this fraction.
|
LongFraction |
LongFraction.subtract(long value) |
Returns the difference of this fraction and the given number.
|
LongFraction |
LongFraction.subtract(LongFraction other) |
Returns the difference of this fraction and the given fraction.
|
static LongFraction |
LongFraction.valueOf(long value) |
Returns a fraction with the given value.
|
static LongFraction |
LongFraction.valueOf(long numerator,
long denominator) |
Returns a fraction with the given numerator and denominator.
|
| Modifier and Type | Method | Description |
|---|---|---|
LongFraction |
LongFraction.add(LongFraction other) |
Returns the sum of this fraction and the given fraction.
|
int |
LongFraction.compareTo(LongFraction other) |
|
LongFraction |
LongFraction.divide(LongFraction other) |
Returns the quotient of this fraction and the given fraction.
|
LongFraction |
LongFraction.multiply(LongFraction other) |
Returns the product of this fraction and the given fraction.
|
LongFraction |
LongFraction.subtract(LongFraction other) |
Returns the difference of this fraction and the given fraction.
|