The point (x,y) is inside the square if x is between the left and right boundaries and y is between the bottom and top boundaries of the TRANSFORMED square. Since the left boundary in local coordinates is
-1.0, the transformed left boundary is
-currentScale+currentTranslateX
The right boundary 1.0 in local coordinates is transformed to
currentScale+currentTranslateX
Similar transformations are performed on the local coordinates of the bottom boundary -1.0 and of the top boundary 1.0 giving the conditions that y must satisfy in projection coordinates.