Rational.IntValue Method

Definition

Returns the value of the specified number as a int.

[Android.Runtime.Register("intValue", "()I", "")]
public override int IntValue ();
[<Android.Runtime.Register("intValue", "()I", "")>]
override this.IntValue : unit -> int

Returns

the divided value of the numerator and denominator as a int.

Attributes

Remarks

Returns the value of the specified number as a int.

#isInfinite Finite rationals are converted to an int value by dividing the numerator by the denominator; conversion for non-finite values happens identically to casting a floating point value to an int, in particular:

<ul> <li>Positive infinity saturates to the largest maximum integer Integer#MAX_VALUE</li> <li>Negative infinity saturates to the smallest maximum integer Integer#MIN_VALUE</li> <li><em>Not-A-Number (NaN)</em> returns 0.</li> </ul>

Java documentation for android.util.Rational.intValue().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to