From eee9539ac25d514456762453cd947d28bbad10e2 Mon Sep 17 00:00:00 2001 From: SileNce5k Date: Fri, 4 Oct 2024 03:56:31 +0200 Subject: [PATCH] Fix wrong calculation for converting celsius to fahrenheit --- commands/misc/convert.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/misc/convert.js b/commands/misc/convert.js index d142766..723697d 100644 --- a/commands/misc/convert.js +++ b/commands/misc/convert.js @@ -14,7 +14,7 @@ module.exports = { switch (args[1].toUpperCase()) { case "C": if (args[2].toUpperCase() === "F") { - const fahrenheit = ((parseFloat(args[0]) * 5 / 9) + 32).toFixed(2); + const fahrenheit = ((parseFloat(args[0]) * 9 / 5) + 32).toFixed(2); sendText = `${args[0]}°C is ${fahrenheit}°F`; } else { sendText = "Can only convert to celsius from fahrenheit";