From 90e22947c60b0c1fa47cf1496790ce1942e4a5d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Thu, 31 Jan 2019 01:58:04 +0100 Subject: [PATCH] Cleanup --- src/cocoa_joystick.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cocoa_joystick.m b/src/cocoa_joystick.m index 2ce977d0..1c2818f0 100644 --- a/src/cocoa_joystick.m +++ b/src/cocoa_joystick.m @@ -406,12 +406,12 @@ int _glfwPlatformPollJoystick(_GLFWjoystick* js, int mode) if (raw > axis->maximum) axis->maximum = raw; - const long delta = axis->maximum - axis->minimum; - if (delta == 0) + const long size = axis->maximum - axis->minimum; + if (size == 0) _glfwInputJoystickAxis(js, (int) i, 0.f); else { - const float value = (2.f * (raw - axis->minimum) / delta) - 1.f; + const float value = (2.f * (raw - axis->minimum) / size) - 1.f; _glfwInputJoystickAxis(js, (int) i, value); } }