clamp

fun clamp(x: Double, low: Double, high: Double): Double

Restrict x to the range low, high.