fixed remap() type to int

This commit is contained in:
Maxim Devaev 2022-01-08 07:18:43 +03:00
parent ae9650b9ee
commit 93a57e5e37

View File

@ -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)
# =====