From 98760ee63b6721c440c120df1a4cc638bc36eb22 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Sun, 15 Oct 2023 21:49:13 +0100 Subject: Added macros for getting the maximum and minimum of two numbers --- src/base.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/base.h') 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 #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; -- cgit v1.2.3-13-gbd6f