Browse Source

fixed error in some of the Con functions where wrong unit was used

remotes/origin/feature
Enrico Schellenberger 11 months ago
parent
commit
ebc9b45de5
  1. 8
      src/main/c/main_taschenrechner.c

8
src/main/c/main_taschenrechner.c

@ -448,11 +448,11 @@ double ConSpeed(double speed, int startingUnit, int endingUnit) {
switch (endingUnit) switch (endingUnit)
{ {
case 0: //kmh to kmh case 0: //kmh to kmh
return distance;
return speed;
break; break;
case 1: //kmh to mph case 1: //kmh to mph
return distance * 0.621371;
return speed * 0.621371;
break; break;
default: default:
@ -463,11 +463,11 @@ double ConSpeed(double speed, int startingUnit, int endingUnit) {
switch (endingUnit) switch (endingUnit)
{ {
case 0: //mph to kmh case 0: //mph to kmh
return distance * 1.60934;
return speed * 1.60934;
break; break;
case 1: //mph to mph case 1: //mph to mph
return distance;
return speed;
break; break;
default: default:

Loading…
Cancel
Save