Fixed convert for temperature

This commit is contained in:
Kwoth 2016-10-10 03:26:51 +02:00
parent 0470f634d0
commit fae2829a68

View File

@ -134,7 +134,7 @@ namespace NadekoBot.Modules.Utility
res = value + 273.15m; //celcius! res = value + 273.15m; //celcius!
break; break;
case "F": case "F":
res = (value + 459.67m) * (5 / 9); res = (value + 459.67m) * (5m / 9m);
break; break;
default: default:
res = value; res = value;
@ -147,7 +147,7 @@ namespace NadekoBot.Modules.Utility
res = value - 273.15m; //celcius! res = value - 273.15m; //celcius!
break; break;
case "F": case "F":
res = res * (9 / 5) - 458.67m; res = res * (9m / 5m) - 459.67m;
break; break;
default: default:
break; break;