fix: test fix to normalized coordinate space.

This commit is contained in:
Zoe
2026-09-20 23:58:02 -05:00
parent 5ea5c9aeb1
commit d4b5ea0254
4 changed files with 35 additions and 26 deletions
+3 -3
View File
@@ -26,9 +26,9 @@ def integer(value, low, high):
def click_pixels(action, width, height, space):
if space == "normalized_1000":
x = (integer(action.get("x"), 0, 1000) * (width - 1) + 500) // 1000 if width > 1000 else integer(action.get("x"), 0, width - 1)
y = (integer(action.get("y"), 0, 1000) * (height - 1) + 500) // 1000 if height > 1000 else integer(action.get("y"), 0, height - 1)
return x, y
x = integer(action.get("x"), 0, 1000)
y = integer(action.get("y"), 0, 1000)
return (x * (width - 1) + 500) // 1000, (y * (height - 1) + 500) // 1000
return integer(action.get("x"), 0, width - 1), integer(action.get("y"), 0, height - 1)