Fixed convert for temperature
This commit is contained in:
parent
0470f634d0
commit
fae2829a68
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user