[+] Encapsulate method to find scale

This commit is contained in:
Hykilpikonna
2019-11-06 21:28:27 -05:00
parent e640384fd8
commit b0d3bf4bd2
+10
View File
@@ -107,6 +107,16 @@ export class GPAUtils
return -1;
}
/**
* Find the scale for a grade
*
* @param grade Letter grade or numeric grade
*/
public static findScale(grade: string): Scale | undefined
{
return this.SCALE.find(scale => scale.letter == grade);
}
/**
* Calculate the total-mean (total/max) average
*