mirror of
https://github.com/edubart/otclient.git
synced 2025-10-20 22:43:27 +02:00
Use of clamp
This commit is contained in:
@@ -45,6 +45,9 @@ float random_range(float min, float max);
|
||||
|
||||
double round(double r);
|
||||
|
||||
template<typename T>
|
||||
T clamp(T x, T min, T max) { return std::max<T>(min, std::min<T>(x, max)); }
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user