- doubleValue
Returns the value of the specified number as a double. This may involve
rounding.
- getDenominator
Returns the denominator.
- getNumerator
Returns the numerator.
- <init>
Creates a new instance of Rational. Rational objects are immutable, so once
you've set your numerato
- intValue
Returns the value of the specified number as an int. This may involve rounding
or truncation. This i
- GCD
- add
- byteValue
Returns the value of the specified number as a byte. This may involve rounding
or truncation. This i
- compareTo
Compares two Rational instances, returning true if they are mathematically
equivalent (in consistenc
- equals
Compares two Rational instances, returning true if they are mathematically
equivalent.
- floatValue
Returns the value of the specified number as a float. This may involve rounding.
- getReciprocal
Returns the reciprocal value of this object as a new Rational.