From c1b3c95536ae7c66f7f5d522348f95440dab5ff0 Mon Sep 17 00:00:00 2001 From: Anton Kling Date: Sat, 30 Nov 2024 17:46:53 +0100 Subject: kernel: Change math.h to use macros Having min/max be functions was a stupid decision in the first place --- kernel/includes/math.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'kernel/includes') diff --git a/kernel/includes/math.h b/kernel/includes/math.h index 19fc595..87a9d37 100644 --- a/kernel/includes/math.h +++ b/kernel/includes/math.h @@ -1,2 +1,3 @@ -int min(int a, int b); -int max(int a, int b); +#define min(a,b) ((a) > (b) ? (b) : (a)) +#define max(a,b) ((a) < (b) ? (b) : (a)) +#define abs(a) ((a)>0?(a):(-1*(a))) -- cgit v1.2.3