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
Classes in org.uncommons.maths.number that implement interfaces with type arguments of type RationalModifier and TypeClassDescriptionfinal classImmutable value object for representing a rational number (or vulgar fraction).Fields in org.uncommons.maths.number declared as RationalModifier and TypeFieldDescriptionstatic final RationalRational.HALFConvenient constant representing a value of a half (1/2 as a rational).static final RationalRational.ONEConvenient constant representing a value of one (1/1 as a rational).static final RationalRational.QUARTERConvenient constant representing a value of a quarter (1/4 as a rational).static final RationalRational.THIRDConvenient constant representing a value of a third (1/3 as a rational).static final RationalRational.THREE_QUARTERSConvenient constant representing a value of three quarters (3/4 as a rational).static final RationalRational.TWO_THIRDSConvenient constant representing a value of two thirds (2/3 as a rational).static final RationalRational.ZEROConvenient 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).intCompares 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).