From 3f6c9c1204df2e87c06fa12fcd97425ccdb379d6 Mon Sep 17 00:00:00 2001 From: Hykilpikonna Date: Sat, 9 Nov 2019 22:38:22 -0500 Subject: [PATCH] [O] Round weight to 2 digits --- src/logic/course.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/logic/course.ts b/src/logic/course.ts index f127d02..f6f40f9 100644 --- a/src/logic/course.ts +++ b/src/logic/course.ts @@ -256,7 +256,7 @@ export default class Course ? this.grading.weightingMap[type] : scoreMax / totalScoreMax; // Return - return {name: type, id: typeAssignments[0].typeId, weight: weight, + return {name: type, id: typeAssignments[0].typeId, weight: +weight.toFixed(2), scoreMax: scoreMax, score: score, percent: +(score / scoreMax * 100).toFixed(2)} }) }