aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2023-10-15 21:49:13 +0100
committerAryadev Chavali <aryadev@aryadevchavali.com>2023-10-15 21:49:13 +0100
commit98760ee63b6721c440c120df1a4cc638bc36eb22 (patch)
treef23d3941b708f73308d1a40e8be63e9e23dfe854 /src
parent639808a092001cf621921311c6665554b9235bb6 (diff)
downloadovm-98760ee63b6721c440c120df1a4cc638bc36eb22.tar.gz
ovm-98760ee63b6721c440c120df1a4cc638bc36eb22.tar.bz2
ovm-98760ee63b6721c440c120df1a4cc638bc36eb22.zip
Added macros for getting the maximum and minimum of two numbers
Diffstat (limited to 'src')
-rw-r--r--src/base.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/base.h b/src/base.h
index b18b9af..0e822d5 100644
--- a/src/base.h
+++ b/src/base.h
@@ -15,6 +15,8 @@
#include <stdint.h>
#define ARR_SIZE(xs) (sizeof(xs) / sizeof(xs[0]))
+#define MAX(a, b) ((a) > (b) ? (a) : (b))
+#define MIN(a, b) ((a) > (b) ? (b) : (a))
typedef uint64_t u64;
typedef uint32_t u32;