summaryrefslogtreecommitdiff
path: root/src/sliceitoff/display/scaling.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/sliceitoff/display/scaling.py')
-rw-r--r--src/sliceitoff/display/scaling.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sliceitoff/display/scaling.py b/src/sliceitoff/display/scaling.py
index aad6c18..af307d1 100644
--- a/src/sliceitoff/display/scaling.py
+++ b/src/sliceitoff/display/scaling.py
@@ -27,10 +27,10 @@ class Scaling():
def scale_to_internal(coords: tuple ) -> tuple:
""" Converts display coordinates to internal coodinates """
x = coords[0] - __class__.left
- x = max(x, 0) / __class__.factor
+ x = max(x, 0) // __class__.factor
x = min(x, INTERNAL_WIDTH - 1)
y = coords[1] - __class__.top
- y = max(y, 0) / __class__.factor
+ y = max(y, 0) // __class__.factor
y = min(y, INTERNAL_HEIGHT - 1)
return (x, y)