rename clamp macro to Clamp to fix compilation with g++11 (and clamp2 for consistency sake)
This commit is contained in:
@@ -289,9 +289,9 @@ extern int strncasecmp(const char *str1, const char *str2, size_t len);
|
||||
|
||||
extern wchar *AllocUnicode(const char*src);
|
||||
|
||||
#define clamp(v, low, high) ((v)<(low) ? (low) : (v)>(high) ? (high) : (v))
|
||||
#define Clamp(v, low, high) ((v)<(low) ? (low) : (v)>(high) ? (high) : (v))
|
||||
|
||||
#define clamp2(v, center, radius) ((v) < (center) ? Max(v, center - radius) : Min(v, center + radius))
|
||||
#define Clamp2(v, center, radius) ((v) < (center) ? Max(v, center - radius) : Min(v, center + radius))
|
||||
|
||||
inline float sq(float x) { return x*x; }
|
||||
#define SQR(x) ((x) * (x))
|
||||
|
||||
Reference in New Issue
Block a user