michaelrocks
value = lowerBound?.let { value.coerceAtLeast(it) } value = upperBound?.let { value.coerceAtMost(it) }