[F] Remove scaleUp if score is 0

This commit is contained in:
Hykilpikonna
2019-09-07 16:44:34 -04:00
parent 68afbb8c76
commit 67cf33b48c
+8 -1
View File
@@ -68,7 +68,14 @@ export class GPAUtils
// Letter grades are the same
if (scale[this.LETTER] == course.letterGrade)
{
totalGPA += <number> scale[this.GPA] + course.scaleUp;
// Get grade and add it
let grade = <number> scale[this.GPA];
totalGPA += grade;
// Add scaleUp if not failed.
if (grade != 0) totalGPA += course.scaleUp;
// That's it
return;
}
})