summaryrefslogtreecommitdiffhomepage
path: root/tracker-wii/wiiyourself/wiimote.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-12-28 03:02:57 +0100
committerStanislaw Halik <sthalik@misaki.pl>2019-01-16 07:48:18 +0100
commit6f04e4ca46e6f2dcd3eda63529a1bbd915f7676b (patch)
tree9aeb1332980c4285396457ad9f278495064549b5 /tracker-wii/wiiyourself/wiimote.cpp
parent3be3bb256f3e9362f8889f0532f875c5ad3b41fb (diff)
clang-tidy fixes only
Maybe global `-Wcomma' is too harsh. There should be no functional changes whatsoever.
Diffstat (limited to 'tracker-wii/wiiyourself/wiimote.cpp')
-rw-r--r--tracker-wii/wiiyourself/wiimote.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tracker-wii/wiiyourself/wiimote.cpp b/tracker-wii/wiiyourself/wiimote.cpp
index f6946fad..90788495 100644
--- a/tracker-wii/wiiyourself/wiimote.cpp
+++ b/tracker-wii/wiiyourself/wiimote.cpp
@@ -1432,7 +1432,7 @@ int wiimote::ParseExtension(BYTE *buff, unsigned offset)
float raw_x = buff[offset + 0];
float raw_y = buff[offset + 1];
- if ((raw_x != joy.RawX) || (raw_y != joy.RawY))
+ if (std::fabs(raw_x - joy.RawX) < 1e-6f || std::fabs(raw_y - joy.RawY) < 1e-6f)
changed |= NUNCHUK_JOYSTICK_CHANGED;
joy.RawX = raw_x;