From f2ca007b30480e849d16789d343acc241013c8a5 Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Thu, 14 Dec 2017 22:35:18 +0000 Subject: [PATCH] Fix --- commands/number-edit/final-grade-calculator.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/number-edit/final-grade-calculator.js b/commands/number-edit/final-grade-calculator.js index 268abd85..af415d53 100644 --- a/commands/number-edit/final-grade-calculator.js +++ b/commands/number-edit/final-grade-calculator.js @@ -37,7 +37,7 @@ module.exports = class FinalGradeCalculatorCommand extends Command { run(msg, { current, desired, weight }) { const required = Math.round((((desired / 100) - ((current / 100) * (1 - (weight / 100)))) / (weight / 100)) * 100); - const diff = current - desired; + const diff = desired - current; let text; if (required > 100) text = above100[Math.floor(Math.random() * above100.length)]; else if (required > 92 || diff > weight * 0.3) text = above92[Math.floor(Math.random() * above92.length)];