diff options
author | Sergeanur <s.anureev@yandex.ua> | 2021-08-16 13:32:15 +0200 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2021-08-16 13:32:15 +0200 |
commit | 0c55f331cf258c57abba3ed70aa4e8ad25aef0b9 (patch) | |
tree | 6070ba081850832cb39d92ecc9971c5354e1d797 /src/core/common.h | |
parent | Merge branch 'miami' into lcs (diff) | |
parent | Merge branch 'master' into miami (diff) | |
download | re3-0c55f331cf258c57abba3ed70aa4e8ad25aef0b9.tar re3-0c55f331cf258c57abba3ed70aa4e8ad25aef0b9.tar.gz re3-0c55f331cf258c57abba3ed70aa4e8ad25aef0b9.tar.bz2 re3-0c55f331cf258c57abba3ed70aa4e8ad25aef0b9.tar.lz re3-0c55f331cf258c57abba3ed70aa4e8ad25aef0b9.tar.xz re3-0c55f331cf258c57abba3ed70aa4e8ad25aef0b9.tar.zst re3-0c55f331cf258c57abba3ed70aa4e8ad25aef0b9.zip |
Diffstat (limited to 'src/core/common.h')
-rw-r--r-- | src/core/common.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/common.h b/src/core/common.h index 916c4df5..361e8515 100644 --- a/src/core/common.h +++ b/src/core/common.h @@ -310,7 +310,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)) |