clampInt

open fun clampInt(min: Int, max: Int, input: Int): Int

Clamps an integer between two integers.

Return

input when min <= input <= max, and either min or max otherwise.