| Package | Description |
|---|---|
| org.kocakosm.pitaya.math |
| Modifier and Type | Field and Description |
|---|---|
static Fraction |
Fraction.ONE
Fraction representation of 1. |
static Fraction |
Fraction.ONE_HALF
Fraction representation of 1/2. |
static Fraction |
Fraction.ONE_QUARTER
Fraction representation of 1/4. |
static Fraction |
Fraction.ONE_THIRD
Fraction representation of 1/3. |
static Fraction |
Fraction.THREE_QUARTERS
Fraction representation of 3/4. |
static Fraction |
Fraction.TWO_QUARTERS
Fraction representation of 2/4. |
static Fraction |
Fraction.TWO_THIRDS
Fraction representation of 2/3. |
static Fraction |
Fraction.ZERO
Fraction representation of 0. |
| Modifier and Type | Method and Description |
|---|---|
Fraction |
Fraction.absoluteValue()
Returns a
Fraction which is the absolute value of this one. |
Fraction |
Fraction.dividedBy(Fraction f)
Divides this value by the given one and returns the result in reduced
form.
|
Fraction |
Fraction.inverted()
Returns the inverse of this
Fraction. |
Fraction |
Fraction.minus(Fraction f)
Subtracts the given value from this one and returns the result in
reduced form.
|
Fraction |
Fraction.multipliedBy(Fraction f)
Multiplies this value by the given one and returns the result in
reduced form.
|
Fraction |
Fraction.negated()
Returns the opposite of this
Fraction. |
static Fraction |
Fraction.parse(String str)
Creates a
Fraction from its String representation. |
Fraction |
Fraction.plus(Fraction f)
Adds the given value to this one and returns the result in reduced
form.
|
Fraction |
Fraction.power(int exponent)
Returns the
Fraction obtained by raising this to the given
power, in reduced form. |
Fraction |
Fraction.reduced()
Returns the reduced form of this
Fraction. |
static Fraction |
Fraction.valueOf(BigInteger val)
Returns the
Fraction representation of the given value. |
static Fraction |
Fraction.valueOf(int val)
Returns the
Fraction representation of the given value. |
static Fraction |
Fraction.valueOf(Integer val)
Returns the
Fraction representation of the given value. |
| Modifier and Type | Method and Description |
|---|---|
int |
Fraction.compareTo(Fraction f) |
Fraction |
Fraction.dividedBy(Fraction f)
Divides this value by the given one and returns the result in reduced
form.
|
Fraction |
Fraction.minus(Fraction f)
Subtracts the given value from this one and returns the result in
reduced form.
|
Fraction |
Fraction.multipliedBy(Fraction f)
Multiplies this value by the given one and returns the result in
reduced form.
|
Fraction |
Fraction.plus(Fraction f)
Adds the given value to this one and returns the result in reduced
form.
|
Copyright © 2012–2015. All rights reserved.