fix: test fix to normalized coordinate space.
This commit is contained in:
+3
-3
@@ -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)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user