fixed mouse remap

This commit is contained in:
Devaev Maxim
2021-03-26 21:32:21 +03:00
parent 1674cf70b3
commit a66221a494
8 changed files with 79 additions and 20 deletions

View File

@@ -32,6 +32,11 @@ from typing import Hashable
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
# =====
def efmt(err: Exception) -> str:
return f"{type(err).__name__}: {err}"