toInt method

int toInt()

Returns this Rat as an int.

Throws if this Rat is not an integer, or if the integer is too big to fit in an int.

Implementation

int toInt() => toBigInt().toInt();