HorizontalPicker/src/main/java/com/wefika/horizontalpicker/HorizontalPicker.java
private int getInBoundsX(int x) {

        if(x < 0) {
            x = 0;
        } else if(x > ((itemWidth + (int) dividerSize) * (values.length - 1))) {
            x = ((itemWidth + (int) dividerSize) * (values.length - 1));
        }
        return x;
    }
private int getInBoundsX(int x) {

        if(x < 0) {
            x = 0;
        } else if(x > ((itemWidth + (int) dividerSize) * (values.length - 1))) {
            x = ((itemWidth + (int) dividerSize) * (values.length - 1));
        }
        return x;
    }
Calculates x scroll position that is still in range of view scroller
@param x Scroll position to calculate.
@return {param x} if is within bounds of over scroller, otherwise it will return min/max
value of scoll position.