clamp

fun Double.clamp(min: Double, max: Double): Double
fun Float.clamp(min: Float, max: Float): Float
fun Short.clamp(min: Short, max: Short): Short
fun Int.clamp(min: Int, max: Int): Int
fun Long.clamp(min: Long, max: Long): Long