summaryrefslogtreecommitdiffstats
path: root/src/core/common.h
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-04-03 11:49:33 +0200
committeraap <aap@papnet.eu>2020-04-03 11:49:33 +0200
commit3b315fec264d1200ab08aa76e93a07859ebb24c1 (patch)
tree5820b697cb24dc935d9d52f23babf36798319d97 /src/core/common.h
parentCCamera fixes (diff)
parentMerge pull request #377 from Fire-Head/master (diff)
downloadre3-3b315fec264d1200ab08aa76e93a07859ebb24c1.tar
re3-3b315fec264d1200ab08aa76e93a07859ebb24c1.tar.gz
re3-3b315fec264d1200ab08aa76e93a07859ebb24c1.tar.bz2
re3-3b315fec264d1200ab08aa76e93a07859ebb24c1.tar.lz
re3-3b315fec264d1200ab08aa76e93a07859ebb24c1.tar.xz
re3-3b315fec264d1200ab08aa76e93a07859ebb24c1.tar.zst
re3-3b315fec264d1200ab08aa76e93a07859ebb24c1.zip
Diffstat (limited to 'src/core/common.h')
-rw-r--r--src/core/common.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/core/common.h b/src/core/common.h
index 7b4ff4a0..b58b93af 100644
--- a/src/core/common.h
+++ b/src/core/common.h
@@ -215,6 +215,7 @@ void re3_assert(const char *expr, const char *filename, unsigned int lineno, con
#define ABS(a) (((a) < 0) ? (-(a)) : (a))
#define norm(value, min, max) (((value) < (min)) ? 0 : (((value) > (max)) ? 1 : (((value) - (min)) / ((max) - (min)))))
+#define lerp(norm, min, max) ( (norm) * ((max) - (min)) + (min) )
#define STRINGIFY(x) #x
#define STR(x) STRINGIFY(x)