summaryrefslogtreecommitdiff
path: root/kernel/includes
diff options
context:
space:
mode:
authorAnton Kling <anton@kling.gg>2024-11-30 17:46:53 +0100
committerAnton Kling <anton@kling.gg>2024-11-30 17:46:53 +0100
commitc1b3c95536ae7c66f7f5d522348f95440dab5ff0 (patch)
treef7d3d46dced164112d642f86a952b4a3ea95dbf5 /kernel/includes
parentf43624cf031cd387095ea12fd5714e49a087c555 (diff)
kernel: Change math.h to use macros
Having min/max be functions was a stupid decision in the first place
Diffstat (limited to 'kernel/includes')
-rw-r--r--kernel/includes/math.h5
1 files changed, 3 insertions, 2 deletions
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)))