diff options
author | erorcun <erayorcunus@gmail.com> | 2020-09-29 00:48:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-29 00:48:11 +0200 |
commit | e2314c7852c47d93ae1ba36398cecff12d73568a (patch) | |
tree | 00ec667839570abc5be30eba825e56e89bc6f31f /src/core/common.h | |
parent | Merge pull request #721 from theR4K/miamiUpstream (diff) | |
parent | TEMPORALY remove flying cars (diff) | |
download | re3-e2314c7852c47d93ae1ba36398cecff12d73568a.tar re3-e2314c7852c47d93ae1ba36398cecff12d73568a.tar.gz re3-e2314c7852c47d93ae1ba36398cecff12d73568a.tar.bz2 re3-e2314c7852c47d93ae1ba36398cecff12d73568a.tar.lz re3-e2314c7852c47d93ae1ba36398cecff12d73568a.tar.xz re3-e2314c7852c47d93ae1ba36398cecff12d73568a.tar.zst re3-e2314c7852c47d93ae1ba36398cecff12d73568a.zip |
Diffstat (limited to 'src/core/common.h')
-rw-r--r-- | src/core/common.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/common.h b/src/core/common.h index ba1d24ef..0a2a236e 100644 --- a/src/core/common.h +++ b/src/core/common.h @@ -219,6 +219,8 @@ extern int strncasecmp(const char *str1, const char *str2, size_t len); #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)) + inline float sq(float x) { return x*x; } #define SQR(x) ((x) * (x)) |