diff options
author | Maxim Devaev <[email protected]> | 2025-01-10 22:56:28 +0200 |
---|---|---|
committer | Maxim Devaev <[email protected]> | 2025-01-10 22:56:28 +0200 |
commit | 72c9ae3aa00b8817fab2b8243203ca6e1c25e146 (patch) | |
tree | aac3f3233212bb029a1e8f117501dc72dc26bce5 /kvmd/mouse.py | |
parent | 05bced1461d6044e95f8bffd93f574bdd7c52735 (diff) |
improved jiggler logic
Diffstat (limited to 'kvmd/mouse.py')
-rw-r--r-- | kvmd/mouse.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kvmd/mouse.py b/kvmd/mouse.py index 31894297..3fb76800 100644 --- a/kvmd/mouse.py +++ b/kvmd/mouse.py @@ -32,3 +32,7 @@ class MouseRange: @classmethod def remap(cls, value: int, out_min: int, out_max: int) -> int: return tools.remap(value, cls.MIN, cls.MAX, out_min, out_max) + + @classmethod + def normalize(cls, value: int) -> int: + return min(max(cls.MIN, value), cls.MAX) |