summaryrefslogtreecommitdiffstats
path: root/src/core/common.h
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-08-16 13:13:31 +0200
committerSergeanur <s.anureev@yandex.ua>2021-08-16 13:13:31 +0200
commitcd0a765f66176be12fc46184e35eb45a796e310a (patch)
treee5f77d34b977176fcca7f24f7d95c038bc928ddf /src/core/common.h
parentRemove not needed entry from config (diff)
parentRemove not needed entry from config (diff)
downloadre3-cd0a765f66176be12fc46184e35eb45a796e310a.tar
re3-cd0a765f66176be12fc46184e35eb45a796e310a.tar.gz
re3-cd0a765f66176be12fc46184e35eb45a796e310a.tar.bz2
re3-cd0a765f66176be12fc46184e35eb45a796e310a.tar.lz
re3-cd0a765f66176be12fc46184e35eb45a796e310a.tar.xz
re3-cd0a765f66176be12fc46184e35eb45a796e310a.tar.zst
re3-cd0a765f66176be12fc46184e35eb45a796e310a.zip
Diffstat (limited to 'src/core/common.h')
-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))