From 96ee9e9265645434c5b0e9861a89d9a47d33acaf Mon Sep 17 00:00:00 2001 From: Hykilpikonna Date: Sat, 9 Nov 2019 17:05:06 -0500 Subject: [PATCH] [O] Default to 2 decimal places --- src/logic/utils/gpa-utils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/logic/utils/gpa-utils.ts b/src/logic/utils/gpa-utils.ts index 9890d31..2a745a6 100644 --- a/src/logic/utils/gpa-utils.ts +++ b/src/logic/utils/gpa-utils.ts @@ -135,7 +135,7 @@ export class GPAUtils }); // Return - return score / max * 100; + return +(score / max * 100).toFixed(2); } /** @@ -185,6 +185,6 @@ export class GPAUtils } // Add average to the row - return score * 100; + return +(score * 100).toFixed(2); } }