question: private Vector2 screenToWorld ( Point p , Dimension size , Vector2 offset , double scale ) { Vector2 v = new Vector2 ( ) ; double x = p . x ; double y = p . y ; double w = size . getWidth ( ) ; double h = size . getHeight ( ) ; double ox = offset . x ; double oy = offset . y ; v . x = ( x - w * 0.5 ) / scale - ox ; v . y = - ( ( y - h * 0.5 ) / scale + oy ) ; return v ; }
target:  Converts from screen coordinates to world coordinates.