Uses of Class
org.uncommons.maths.number.Rational

Packages that use Rational
Package
Description
Custom numeric data types and classes for working with java.lang.Number and its sub-classes.
  • Uses of Rational in org.uncommons.maths.number

    Fields in org.uncommons.maths.number declared as Rational
    Modifier and Type
    Field
    Description
    static final Rational
    Rational.HALF
    Convenient constant representing a value of a half (1/2 as a rational).
    static final Rational
    Rational.ONE
    Convenient constant representing a value of one (1/1 as a rational).
    static final Rational
    Rational.QUARTER
    Convenient constant representing a value of a quarter (1/4 as a rational).
    static final Rational
    Rational.THIRD
    Convenient constant representing a value of a third (1/3 as a rational).
    static final Rational
    Convenient constant representing a value of three quarters (3/4 as a rational).
    static final Rational
    Rational.TWO_THIRDS
    Convenient constant representing a value of two thirds (2/3 as a rational).
    static final Rational
    Rational.ZERO
    Convenient constant representing a value of zero (0/1 as a rational).
    Methods in org.uncommons.maths.number that return Rational
    Modifier and Type
    Method
    Description
    Rational.add(Rational value)
    Add the specified value to this value and return the result as a new object (also a rational).
    Rational.divide(Rational value)
    Divide this rational by the specified value and return the result as a new object (also a Rational).
    Rational.multiply(Rational value)
    Multiply this rational by the specified value and return the result as a new object (also a Rational).
    Rational.subtract(Rational value)
    Subtract the specified value from this value and return the result as a new object (also a rational).
    Methods in org.uncommons.maths.number with parameters of type Rational
    Modifier and Type
    Method
    Description
    Rational.add(Rational value)
    Add the specified value to this value and return the result as a new object (also a rational).
    int
    Rational.compareTo(Rational other)
    Compares this value with the specified object for order.
    Rational.divide(Rational value)
    Divide this rational by the specified value and return the result as a new object (also a Rational).
    Rational.multiply(Rational value)
    Multiply this rational by the specified value and return the result as a new object (also a Rational).
    Rational.subtract(Rational value)
    Subtract the specified value from this value and return the result as a new object (also a rational).