123456789101112
// keeps value within parameters function K(value,minimum,maximum){ if (value < minimum){ return minimum; } else if (value > maximum){ return maximum; } else{ return value; } }