toIntClamp

fun Long.toIntClamp(min: Int = Int.MIN_VALUE, max: Int = Int.MAX_VALUE): Int

Clamps this value into the range min and max converting it into Int. The default parameters will cover the whole range of values.