Function clampi
pub fn clampi(value: i64, min: i64, max: i64) -> i64Expand description
Clamps the value, returning an int not less than min and not more than max.
var speed = 42
var a = clampi(speed, 1, 20) # a is 20
speed = -10
var b = clampi(speed, -1, 1) # b is -1