As you can see on this site, a usual way to calculate rounded number is: Math.round(num * 100) / 100
But my tests have shown me a strange behaviour of this method:
Math.round(1.155 * 100) / 100 = 1.16
Math.round(1.355 * 100) / 100 = 1.36
Math.round(1.255 * 100) / 100 = 1.25 - it's a mistake
Math.round(1.455 * 100) / 100 = 1.46
Math.round(0.255 * 100) / 100 = 0.26
Math.round(2.255 * 100) / 100 = 2.26
Math.round(3.255 * 100) / 100 = 3.26
Math.round(1.255 * 100) / 100 = 1.25 - it's a mistake
Be careful!