diff options
| author | Léo Lam <leo@innovatetechnologi.es> | 2017-12-26 00:38:44 +0100 |
|---|---|---|
| committer | Léo Lam <leo@innovatetechnologi.es> | 2019-05-04 23:12:17 +0200 |
| commit | ab9ece9bcab8a6d55dbe6f3a904d49231e5f73e1 (patch) | |
| tree | 3993f73a513f6f80ecddff85882042b73da261da /Source/Core/InputCommon/ControllerEmu/StickGate.cpp | |
| parent | 6f84984b7b0514227327b2e2c5ef10907d150b96 (diff) | |
Replace MathUtil::Clamp with std::clamp
Diffstat (limited to 'Source/Core/InputCommon/ControllerEmu/StickGate.cpp')
| -rw-r--r-- | Source/Core/InputCommon/ControllerEmu/StickGate.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/Core/InputCommon/ControllerEmu/StickGate.cpp b/Source/Core/InputCommon/ControllerEmu/StickGate.cpp index 48c21ae5be..70ed383398 100644 --- a/Source/Core/InputCommon/ControllerEmu/StickGate.cpp +++ b/Source/Core/InputCommon/ControllerEmu/StickGate.cpp @@ -4,6 +4,7 @@ #include "InputCommon/ControllerEmu/StickGate.h" +#include <algorithm> #include <cmath> #include "Common/Common.h" @@ -277,8 +278,8 @@ ReshapableInput::ReshapeData ReshapableInput::Reshape(ControlState x, ControlSta // Scale to the gate shape/radius: dist *= gate_max_dist; - return {MathUtil::Clamp(std::cos(angle) * dist, -1.0, 1.0), - MathUtil::Clamp(std::sin(angle) * dist, -1.0, 1.0)}; + return {std::clamp(std::cos(angle) * dist, -1.0, 1.0), + std::clamp(std::sin(angle) * dist, -1.0, 1.0)}; } } // namespace ControllerEmu |
