def get_virtual_coordinates(self, x, y):
        """Transforms coordinates that belongs the *real* window size, to the
        coordinates that belongs to the *virtual* window.

        For example, if you created a window of 640x480, and it was resized
        to 640x1000, then if you move your mouse over that window,
        it will return the coordinates that belongs to the newly resized window.
        Probably you are not interested in those coordinates, but in the coordinates
        that belongs to your *virtual* window.

        :rtype: (x,y)
        :returns: Transformed coordinates from the *real* window to the *virtual* window
        """

        x_diff = self._window_virtual_width / float(self.window.width - self._offset_x * 2)
        y_diff = self._window_virtual_height / float(self.window.height - self._offset_y * 2)

        adjust_x = (self._window_virtual_width - self.window.width * x_diff) / 2
        adjust_y = (self.window.height * y_diff - self._window_virtual_height) / 2

        return int(x_diff * x) - adjust_x, int(y_diff * y) - adjust_y
dataset/ETHPy150Open los-cocos/cocos/cocos/director.py/Director.get_virtual_coordinates/swapped operands of `-`