diff options
author | Fire-Head <Fire-Head@users.noreply.github.com> | 2019-08-02 22:20:12 +0200 |
---|---|---|
committer | Fire-Head <Fire-Head@users.noreply.github.com> | 2019-08-02 22:20:12 +0200 |
commit | 6ba2b05443dd25b2451215bc73912dcb7b0e6240 (patch) | |
tree | e539fbb511e96622fff06cbe7fac8099aea772df /src/core/common.h | |
parent | Merge pull request #2 from GTAmodding/master (diff) | |
download | re3-6ba2b05443dd25b2451215bc73912dcb7b0e6240.tar re3-6ba2b05443dd25b2451215bc73912dcb7b0e6240.tar.gz re3-6ba2b05443dd25b2451215bc73912dcb7b0e6240.tar.bz2 re3-6ba2b05443dd25b2451215bc73912dcb7b0e6240.tar.lz re3-6ba2b05443dd25b2451215bc73912dcb7b0e6240.tar.xz re3-6ba2b05443dd25b2451215bc73912dcb7b0e6240.tar.zst re3-6ba2b05443dd25b2451215bc73912dcb7b0e6240.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/common.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/core/common.h b/src/core/common.h index 9a5683c6..97a25a3f 100644 --- a/src/core/common.h +++ b/src/core/common.h @@ -180,6 +180,7 @@ void re3_assert(const char *expr, const char *filename, unsigned int lineno, con #define max(a, b) (((a) > (b)) ? (a) : (b)) #define min(a, b) (((a) < (b)) ? (a) : (b)) #define ABS(a) (((a) < 0) ? (-a) : (a)) +#define norm(value, min, max) (((value) < (min)) ? 0 : (((value) > (max)) ? 1 : (((value) - (min)) / ((max) - (min))))) #define STRINGIFY(x) #x |