Java android.util Rational fields, constructors, methods, implement or subclass

Example usage for Java android.util Rational fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for android.util Rational.

The text is from its open source code.

Constructor

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.

Method

intgetDenominator()
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 .

intgetNumerator()
Gets the numerator of the rational.