@SuppressWarnings("unused") public static float valueRangeLimit(float value,float startValue,float endValue){
  if (value < Math.min(startValue,endValue))   return Math.min(startValue,endValue);
  if (value > Math.max(startValue,endValue))   return Math.max(startValue,endValue);
  return value;
}

@ SuppressWarnings ( "unused" ) public static float valueRangeLimit ( float value , float startValue , float endValue ) { if ( value < Math . min ( startValue , endValue ) ) return Math . min ( startValue , endValue ) ; if ( value > Math . max ( startValue , endValue ) ) return Math . max ( startValue , endValue ) ; return value ; }
limit number within a values range . this method not consider the sign and the upper and lower values limit order .
