summaryrefslogtreecommitdiff
path: root/kvmd/tools.py
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2022-01-08 07:18:43 +0300
committerMaxim Devaev <[email protected]>2022-01-08 07:18:43 +0300
commit93a57e5e37271905a9678a94827d73d24be9e18b (patch)
treebdc1494382b52ebbfe4c052e133386691b378af7 /kvmd/tools.py
parentae9650b9eed5e30f9a7671e02536ee8e5bcc8a3b (diff)
fixed remap() type to int
Diffstat (limited to 'kvmd/tools.py')
-rw-r--r--kvmd/tools.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/kvmd/tools.py b/kvmd/tools.py
index e1999c37..7af6723c 100644
--- a/kvmd/tools.py
+++ b/kvmd/tools.py
@@ -34,7 +34,7 @@ from typing import TypeVar
# =====
def remap(value: int, in_min: int, in_max: int, out_min: int, out_max: int) -> int:
- return (value - in_min) * (out_max - out_min) // (in_max - in_min) + out_min
+ return int((value - in_min) * (out_max - out_min) // (in_max - in_min) + out_min)
# =====