5
Hello. I need to make a simulator where a student enters the grade 1, the grade 2 and he calculates the average.
Note 1 is multiplied by 0,4 and Note 2 by 0,6.
Notes are decimal and only the second box after the comma is rounded.
Ex: 4,46 - round to 4,5
the problem is that according to the criterion of the institution, if the second house is up to 4, it rounds down (4.94 -> 4.9) and if it is up to 5, round up (4.95 -> 5.0).
I’m using the function
var mediaFinal = Math.round(media_sem_arrend * 10) / 10;
In the standard rounding functions, up to 5 it rounds down and from 6 it rounds up.
Can someone help me in this matter?
Grateful.