Javascript Math clip(number, min, max){
Math.clip = function(number, min, max){ return Math.max(min, Math.min(number, max)); };