diff options
Diffstat (limited to 'common.h')
| -rw-r--r-- | common.h | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -63,6 +63,16 @@ */ #define ELEMSOF(ARRAY) (sizeof(ARRAY) / sizeof(*(ARRAY))) +/** + * Select the minimum of two values + */ +#define MIN(A, B) ((A) < (B) ? (A) : (B)) + +/** + * Select the maximum of two values + */ +#define MAX(A, B) ((A) > (B) ? (A) : (B)) + #include "algorithms.h" |
