-
Fraction
representation of 4/5.
Fraction
representation of 1.
Fraction
representation of 1/5.
Fraction
representation of 1/2.
Fraction
representation of 1/4.
Fraction
representation of 1/3.
Fraction
representation of 3/5.
Fraction
representation of 3/4.
Fraction
representation of 2/5.
Fraction
representation of 2/4.
Fraction
representation of 2/3.
Fraction
representation of 0.
Gets a fraction that is the positive equivalent of this one.
Adds the value of this fraction to another, returning the result in reduced form.
Divide the value of this fraction by another.
Gets a fraction that is the inverse (1/fraction) of this one.
Multiplies the value of this fraction by another, returning the result in reduced form.
Gets a fraction that is the negative (-fraction) of this one.
Fraction.of(double value)
Creates a Fraction
instance from a double
value.
Fraction.of(int numerator,
int denominator)
Fraction.of(int numerator,
int denominator,
boolean reduce)
Creates a Fraction
instance with the 2 parts of a fraction Y/Z.
Fraction.of(int whole,
int numerator,
int denominator)
Fraction.of(int whole,
int numerator,
int denominator,
boolean reduce)
Creates a Fraction
instance with the 3 parts of a fraction X Y/Z.
Creates a Fraction from a String
.
Gets a fraction that is raised to the passed in power.
Reduce the fraction to the smallest values for the numerator and denominator, returning the result.
Subtracts the value of another fraction from the value of this one, returning the result in reduced form.
Adds the value of this fraction to another, returning the result in reduced form.
int
Compares this object to another based on size.
Divide the value of this fraction by another.
Multiplies the value of this fraction by another, returning the result in reduced form.
Subtracts the value of another fraction from the value of this one, returning the result in reduced form.