From ebc9b45de54020ec7f88e15b08bd7db6aa240e00 Mon Sep 17 00:00:00 2001 From: Enrico Schellenberger Date: Tue, 6 Feb 2024 12:57:29 +0100 Subject: [PATCH] fixed error in some of the Con functions where wrong unit was used --- src/main/c/main_taschenrechner.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/c/main_taschenrechner.c b/src/main/c/main_taschenrechner.c index 9ccf8f4..bed82fa 100644 --- a/src/main/c/main_taschenrechner.c +++ b/src/main/c/main_taschenrechner.c @@ -448,11 +448,11 @@ double ConSpeed(double speed, int startingUnit, int endingUnit) { switch (endingUnit) { case 0: //kmh to kmh - return distance; + return speed; break; case 1: //kmh to mph - return distance * 0.621371; + return speed * 0.621371; break; default: @@ -463,11 +463,11 @@ double ConSpeed(double speed, int startingUnit, int endingUnit) { switch (endingUnit) { case 0: //mph to kmh - return distance * 1.60934; + return speed * 1.60934; break; case 1: //mph to mph - return distance; + return speed; break; default: