clamp

fun Int.clamp(min: Int, max: Int): Int

Restricts Int to be within a min and a max value