summaryrefslogtreecommitdiffstats
path: root/src/input_common
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-04-20 20:18:03 +0200
committerGitHub <noreply@github.com>2018-04-20 20:18:03 +0200
commit326b044c19df0b1a342acf87f2ba7cd06e9a1e97 (patch)
treed815c707b437b3685e8ba188bbf0940d4205de2a /src/input_common
parentMerge pull request #361 from lioncash/common (diff)
parentmath_util: Remove the Clamp() function (diff)
downloadyuzu-326b044c19df0b1a342acf87f2ba7cd06e9a1e97.tar
yuzu-326b044c19df0b1a342acf87f2ba7cd06e9a1e97.tar.gz
yuzu-326b044c19df0b1a342acf87f2ba7cd06e9a1e97.tar.bz2
yuzu-326b044c19df0b1a342acf87f2ba7cd06e9a1e97.tar.lz
yuzu-326b044c19df0b1a342acf87f2ba7cd06e9a1e97.tar.xz
yuzu-326b044c19df0b1a342acf87f2ba7cd06e9a1e97.tar.zst
yuzu-326b044c19df0b1a342acf87f2ba7cd06e9a1e97.zip
Diffstat (limited to 'src/input_common')
-rw-r--r--src/input_common/motion_emu.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/input_common/motion_emu.cpp b/src/input_common/motion_emu.cpp
index 59a035e70..caffe48cb 100644
--- a/src/input_common/motion_emu.cpp
+++ b/src/input_common/motion_emu.cpp
@@ -2,6 +2,7 @@
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
+#include <algorithm>
#include <chrono>
#include <mutex>
#include <thread>
@@ -43,8 +44,8 @@ public:
tilt_angle = 0;
} else {
tilt_direction = mouse_move.Cast<float>();
- tilt_angle = MathUtil::Clamp(tilt_direction.Normalize() * sensitivity, 0.0f,
- MathUtil::PI * 0.5f);
+ tilt_angle =
+ std::clamp(tilt_direction.Normalize() * sensitivity, 0.0f, MathUtil::PI * 0.5f);
}
}
}