constrain

将值归一化到某个范围内


语法
 constrain(amt,low,high)


参数


返回值

返回处理后的值


示例
sensVal = constrain(sensVal, 10, 150);