From 0100fa823d7375c0d6ba5ce6bca4850bc0e1b30a Mon Sep 17 00:00:00 2001 From: Abdelrahman Date: Sun, 4 Feb 2024 20:32:56 +0100 Subject: [PATCH] absolute funktion --- src/c/funktionen.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/c/funktionen.c b/src/c/funktionen.c index 40d41d3..b762515 100644 --- a/src/c/funktionen.c +++ b/src/c/funktionen.c @@ -1,6 +1,7 @@ #include #include #include +#include #include "funktionen.h" // Function to calculate the square of a number @@ -26,3 +27,8 @@ return x * x * x; float cubeRoot(float x) { return cbrt(x); } + +// Function to calculate the absolute value of a number +float absolute(float x) { +return fabs(x); +}