diff --git a/src/c/funktionen.h b/src/c/funktionen.h index c4c1f27..26f686a 100644 --- a/src/c/funktionen.h +++ b/src/c/funktionen.h @@ -46,4 +46,6 @@ float minimum(float x, float y); // Function to calculate the average of two numbers float average(float x, float y); +// Function to calculate the remainder of division between two numbers +float remainderValue(float x, float y); #endif \ No newline at end of file diff --git a/src/test/test_funktionen.c b/src/test/test_funktionen.c index 28788a2..db518d1 100644 --- a/src/test/test_funktionen.c +++ b/src/test/test_funktionen.c @@ -87,4 +87,10 @@ void test_average(void) { TEST_ASSERT_FLOAT_WITHIN(0.000001, 7.0, result); } +void test_remainderValue(void) { + float result = remainderValue(10.5, 3.0); + TEST_ASSERT_FLOAT_WITHIN(0.000001, 1.5, result); +} + + #endif \ No newline at end of file