question: public void move ( float newX ) { float currWidth = viewportRect . width ( ) ; newX = Math . max ( minX - currWidth , Math . min ( newX , maxX - currWidth + currWidth ) ) ; viewportRect . left = newX ; viewportRect . right = newX + currWidth ; }
target:  Move viewport to new X, Y