clamp

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

Clamps this value into the range min and max


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

Clamps this value into the range min and max


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

Clamps this value into the range min and max


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

Clamps this value into the range min and max