Hello. I need to do a simulator in which a student inserts note 1, note 2 and he calculates the average.
Note 1 is multiplied by 0.4 and note 2 by 0.6.
The notes are decimal and only the second house after the comma is rounded.
Ex: 4.46 - round to 4.5
The problem is that according to the criteria of the institution, if the second house is up to 4, it rounds down (4.94 -> 4.9) and if it is 5 up, 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 rounds up.
Can anyone help me with this?
Thank you.