From 6bdd7b60203378e2cd538802c6dd5f64d8b16da5 Mon Sep 17 00:00:00 2001 From: christoph-heinrich Date: Sat, 4 Nov 2023 21:49:10 +0100 Subject: [PATCH] refactor: remove check before adding 0.5 to cursor position math.huge + 0.5 == math.huge --- src/uosc/lib/cursor.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/uosc/lib/cursor.lua b/src/uosc/lib/cursor.lua index 866ef148..d576c63b 100644 --- a/src/uosc/lib/cursor.lua +++ b/src/uosc/lib/cursor.lua @@ -204,8 +204,7 @@ function cursor:move(x, y) end -- Add 0.5 to be in the middle of the pixel - self.x = x == math.huge and x or x + 0.5 - self.y = y == math.huge and y or y + 0.5 + self.x, self.y = x + 0.5, y + 0.5 if old_x ~= self.x or old_y ~= self.y then if self.x == math.huge or self.y == math.huge then