summaryrefslogtreecommitdiffstats
path: root/src/core/common.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/core/common.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/common.h b/src/core/common.h
index 21337e21..12c80b71 100644
--- a/src/core/common.h
+++ b/src/core/common.h
@@ -296,7 +296,7 @@ extern wchar *AllocUnicode(const char*src);
#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) ? Min(v, center + radius) : Max(v, center - radius))
inline float sq(float x) { return x*x; }
#define SQR(x) ((x) * (x))