From 823ac2a8c6fb9e3f5df6df7b96f81e19589d6508 Mon Sep 17 00:00:00 2001 From: Abdelrahman Date: Sun, 4 Feb 2024 21:58:28 +0100 Subject: [PATCH] test_absoluteDifference Funktion --- src/c/funktionen.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/c/funktionen.c b/src/c/funktionen.c index 1796b2c..1674f5f 100644 --- a/src/c/funktionen.c +++ b/src/c/funktionen.c @@ -81,3 +81,8 @@ return floor(x); float ceilingValue(float x) { return ceil(x); } + +// Function to calculate the absolute difference between two numbers +float absoluteDifference(float x, float y) { + return fabs(x - y); +}