Example usage for Java android.util Rational fields, constructors, methods, implement or subclass
The text is from its open source code.
Rational(int numerator, int denominator) Create a Rational with a given numerator and denominator. The signs of the numerator and the denominator may be flipped such that the denominator is always positive. |
int | getDenominator() Gets the denominator of the rational The denominator may return 0 , in which case the rational may represent positive infinity (if the numerator was positive), negative infinity (if the numerator was negative), or NaN (if the numerator was 0 ). The denominator will always return 1 if the numerator is 0 . |
int | getNumerator() Gets the numerator of the rational. |