diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2019-08-03 15:02:09 +0200 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2019-08-03 15:02:09 +0200 |
commit | a3bdaccafbf4e916597fae9df71e3b7052be1647 (patch) | |
tree | 37a42c0b9ecdf75b8d4a524dbf76a10e9b8fe984 /src/core/common.h | |
parent | RunningScript, part 4, plus some fixes (diff) | |
parent | Merge pull request #178 from Fire-Head/master (diff) | |
download | re3-a3bdaccafbf4e916597fae9df71e3b7052be1647.tar re3-a3bdaccafbf4e916597fae9df71e3b7052be1647.tar.gz re3-a3bdaccafbf4e916597fae9df71e3b7052be1647.tar.bz2 re3-a3bdaccafbf4e916597fae9df71e3b7052be1647.tar.lz re3-a3bdaccafbf4e916597fae9df71e3b7052be1647.tar.xz re3-a3bdaccafbf4e916597fae9df71e3b7052be1647.tar.zst re3-a3bdaccafbf4e916597fae9df71e3b7052be1647.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 |