mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-11 05:27:58 -05:00
math_util: Remove the Clamp() function
C++17 adds clamp() to the standard library, so we can remove ours in favor of it.
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user