diff options
author | rom <romangraef@gmail.com> | 2021-04-24 02:45:50 +0200 |
---|---|---|
committer | rom <romangraef@gmail.com> | 2021-04-24 02:45:50 +0200 |
commit | 635185baac3a2a9c5e50971d994ca7bcdec1d495 (patch) | |
tree | 4c67ce418ddd2e598d82db056484d5da472c3e0f | |
parent | 16816aa5187b1c439da71f4badfbe8afdb5ec435 (diff) | |
download | txtgameengine-635185baac3a2a9c5e50971d994ca7bcdec1d495.tar.gz txtgameengine-635185baac3a2a9c5e50971d994ca7bcdec1d495.tar.bz2 txtgameengine-635185baac3a2a9c5e50971d994ca7bcdec1d495.zip |
typing.Tuple
-rw-r--r-- | txtgameengine/platform.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/txtgameengine/platform.py b/txtgameengine/platform.py index c04607e..cd3a17d 100644 --- a/txtgameengine/platform.py +++ b/txtgameengine/platform.py @@ -98,11 +98,11 @@ class CoordinateComponent: def pixel_y(self): return [0, self.app.size[1]] - def from_screen_to_pixels(self, x: float, y: float) -> (int, int): + def from_screen_to_pixels(self, x: float, y: float) -> typing.Tuple[int, int]: return int(np.interp(x, self.screen_x, self.pixel_x)), \ int(np.interp(y, self.screen_y, self.pixel_y)) - def from_pixels_to_screen(self, x: int, y: int) -> (float, float): + def from_pixels_to_screen(self, x: int, y: int) -> typing.Tuple[float, float]: return np.interp(x, self.pixel_x, self.screen_x), \ np.interp(y, self.pixel_y, self.screen_y) |