mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-27 04:36:18 +00:00
Change the modified parameter in the Clamp function to be a pointer.
Makes it easier to identify the one being modified.
This commit is contained in:
parent
6b87a0ef20
commit
249b00c469
10 changed files with 24 additions and 24 deletions
|
@ -14,12 +14,12 @@
|
|||
namespace MathUtil
|
||||
{
|
||||
template<class T>
|
||||
inline void Clamp(T& val, const T& min, const T& max)
|
||||
inline void Clamp(T* val, const T& min, const T& max)
|
||||
{
|
||||
if (val < min)
|
||||
val = min;
|
||||
else if (val > max)
|
||||
val = max;
|
||||
if (*val < min)
|
||||
*val = min;
|
||||
else if (*val > max)
|
||||
*val = max;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue