public void setViewportTopLeft(float left, float top) {
        /**
         * Constrains within the scroll range. The scroll range is simply the viewport extremes (AXIS_X_MAX,
         * etc.) minus
         * the viewport size. For example, if the extrema were 0 and 10, and the viewport size was 2, the scroll range
         * would be 0 to 8.
         */

        final float curWidth = currentViewport.width();
        final float curHeight = currentViewport.height();

        left = Math.max(maxViewport.left, Math.min(left, maxViewport.right - curWidth));
        top = Math.max(maxViewport.bottom + curHeight, Math.min(top, maxViewport.top));
        constrainViewport(left, top, left + curWidth, top - curHeight);
    }
public void setViewportTopLeft ( float left , float top ) { final float curWidth = currentViewport . width ( ) ; final float curHeight = currentViewport . height ( ) ; left = Math . max ( maxViewport . left , Math . min ( left , maxViewport . right - curWidth ) ) ; top = Math . max ( maxViewport . bottom + curHeight , Math . min ( top , maxViewport . top ) ) ; constrainViewport ( left , top , left + curWidth , top - curHeight ) ; }
Sets the current viewport (defined by {@link #currentViewport}) to the given X and Y positions.