[+] Encapsulate method to find scale
This commit is contained in:
@@ -107,6 +107,16 @@ export class GPAUtils
|
|||||||
return -1;
|
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
|
* Calculate the total-mean (total/max) average
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user