From 57eead90780b66a045e48eb24d80ffea688b38a2 Mon Sep 17 00:00:00 2001 From: AL2009man <67606569+AL2009man@users.noreply.github.com> Date: Thu, 29 May 2025 00:07:33 -0400 Subject: [PATCH] cleaned up MouseGetScaledDelta and AbsScaledDelta To prepare for the revised MouseScaledDelta: the current setup has been simplified for easier code reading --- port/src/input.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/port/src/input.c b/port/src/input.c index 1ad084260..c1c03ee1b 100644 --- a/port/src/input.c +++ b/port/src/input.c @@ -1244,8 +1244,8 @@ void inputMouseGetScaledDelta(f32* dx, f32* dy) f32 mdx = 0.f, mdy = 0.f; if (mouseLocked) { - mdx = mouseSensX * ((f32)mouseDX / 3.5f) * 0.022f; - mdy = mouseSensY * ((f32)mouseDY / 3.5f) * 0.022f; + mdx = mouseDX * (0.022f / 3.5f) * mouseSensX; + mdy = mouseDY * (0.022f / 3.5f) * mouseSensY; } if (dx) *dx = mdx; if (dy) *dy = mdy; @@ -1256,8 +1256,8 @@ void inputMouseGetAbsScaledDelta(f32* dx, f32* dy) f32 mdx = 0.f, mdy = 0.f; if (mouseLocked) { - mdx = fabsf(mouseSensX) * ((f32)mouseDX / 3.5f) * 0.022f; - mdy = fabsf(mouseSensY) * ((f32)mouseDY / 3.5f) * 0.022f; + mdx = fabsf(mouseDX) * (0.022f / 3.5f) * fabsf(mouseSensX); + mdy = fabsf(mouseDY) * (0.022f / 3.5f) * fabsf(mouseSensY); } if (dx) *dx = mdx; if (dy) *dy = mdy;