public static double clamp ( double value , double low , double high ) { if ( value < low ) { return low ; } if ( value > high ) { return high ; } return value ; }
Clamps the value between the low and high boundaries