question: private double screenToNormalized ( float screenCoord ) { int width = getWidth ( ) ; if ( width <= 2 * padding ) { return 0d ; } else { double result = ( screenCoord - padding ) / ( width - 2 * padding ) ; return Math . min ( 1d , Math . max ( 0d , result ) ) ; } }
target:  Converts screen space x-coordinates into normalized values.