code: private static float computeScale(float minScale, float maxScale, float currentScale, float delta) {
  		if(currentScale * delta < minScale) {
  			return minScale / currentScale;
  		} else if(currentScale * delta > maxScale) {
  			return maxScale / currentScale;
  		}
  
  		return delta;
  	}
docs: The scale values must be in [minScale, maxScale]