From 5660c556a06916c2f1e004f7f8d5e368b3a88e25 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Thu, 14 May 2026 19:46:14 +0200 Subject: Clean up MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- common.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'common.h') diff --git a/common.h b/common.h index 1c41d21..f64399a 100644 --- a/common.h +++ b/common.h @@ -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" -- cgit v1.2.3-70-g09d2