From adbf3d035330033e9b9cd880f6618adbd7be8517 Mon Sep 17 00:00:00 2001 From: Matheus Date: Thu, 5 Jan 2023 19:37:46 -0300 Subject: [PATCH] math.h: long absolute --- src/include/math.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/include/math.h b/src/include/math.h index ce4db273..78cebe35 100644 --- a/src/include/math.h +++ b/src/include/math.h @@ -1,6 +1,11 @@ #ifndef _MATH_H_INCLUDE #define _MATH_H_INCLUDE + long intpow(long base, long exp); +static inline long labs(long n){ + return n < 0 ? -n : n; +} + #endif