@ -328,3 +328,7 @@ float average(float x, float y) {
float remainderValue(float x, float y) {
return fmod(x, y);
}
float f(float m) {
return m * 9.81;
@ -151,4 +151,7 @@ float average(float x, float y);
// Function to calculate the remainder of division between two numbers
float remainderValue(float x, float y);
float f(float m);
// berechnet die Gewichtkraft
#endif
@ -424,4 +424,18 @@ void test_tangentDegrees(void) {
// Add more test cases for different inputs and expected outputs
void test_weight_at_mass100(void)
{
/* arrange */
float actual;
float expected = 981;
/* act */;
float m = 100;
actual = f(m);
/* assert */
TEST_ASSERT_EQUAL_FLOAT(expected, actual);