From 6e91e60300bee641fe73865844050375dd57c419 Mon Sep 17 00:00:00 2001 From: Abdelrahman Date: Sun, 4 Feb 2024 22:12:13 +0100 Subject: [PATCH] average Funktion --- src/c/funktionen.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/c/funktionen.c b/src/c/funktionen.c index 6295843..349fb54 100644 --- a/src/c/funktionen.c +++ b/src/c/funktionen.c @@ -97,3 +97,8 @@ float minimum(float x, float y) { return fmin(x, y); } +// Function to calculate the average of two numbers +float average(float x, float y) { + return (x + y) / 2; +} +