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 RationalModifier and TypeFieldDescriptionstatic 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
Rational.THREE_QUARTERS
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 RationalModifier and TypeMethodDescriptionAdd the specified value to this value and return the result as a new object (also a rational).Divide this rational by the specified value and return the result as a new object (also a Rational).Multiply this rational by the specified value and return the result as a new object (also a Rational).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 RationalModifier and TypeMethodDescriptionAdd the specified value to this value and return the result as a new object (also a rational).int
Compares this value with the specified object for order.Divide this rational by the specified value and return the result as a new object (also a Rational).Multiply this rational by the specified value and return the result as a new object (also a Rational).Subtract the specified value from this value and return the result as a new object (also a rational).