mirror of
https://github.com/edubart/otclient.git
synced 2025-12-14 20:59:47 +01: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