From 6f04e4ca46e6f2dcd3eda63529a1bbd915f7676b Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 28 Dec 2018 03:02:57 +0100 Subject: clang-tidy fixes only Maybe global `-Wcomma' is too harsh. There should be no functional changes whatsoever. --- tracker-wii/wiiyourself/wiimote.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tracker-wii/wiiyourself/wiimote.cpp') 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; -- cgit v1.2.3