Example usage for Java org.apache.commons.lang3.math Fraction fields, constructors, methods, implement or subclass
The text is from its open source code.
String | toString Cached output toString (class is immutable). |
Fraction | add(final Fraction fraction) Adds the value of this fraction to another, returning the result in reduced form. |
double | doubleValue() Gets the fraction as a |
int | getDenominator() Gets the denominator part of the fraction. |
Fraction | getFraction(double value) Creates a This method uses the continued fraction algorithm, computing a maximum of 25 convergents and bounding the denominator by 10,000. |
Fraction | getFraction(String str) Creates a Fraction from a The formats accepted are:
and a . |
Fraction | getFraction(int numerator, int denominator) Creates a Any negative signs are resolved to be on the numerator. |
int | getNumerator() Gets the numerator part of the fraction. This method may return a value greater than the denominator, an improper fraction, such as the seven in 7/4. |
int | intValue() Gets the fraction as an |
Fraction | multiplyBy(final Fraction fraction) Multiplies the value of this fraction by another, returning the result in reduced form. |