toUintClamp

fun Long.toUintClamp(min: Int = 0, max: Int = Int.MAX_VALUE): Int

Clamps this value into the range min and max converting it into Int (where min must be zero or positive). The default parameters will cover the whole range of positive and zero values.