private float limitedScale(float targetScale){
  targetScale=Math.max(minScale(),targetScale);
  targetScale=Math.min(maxScale,targetScale);
  return targetScale;
}

private float limitedScale ( float targetScale ) { targetScale = Math . max ( minScale ( ) , targetScale ) ; targetScale = Math . min ( maxScale , targetScale ) ; return targetScale ; }
adjust a requested scale to be within the allowed limits .
