Use Math.round(num * 100) / 100
Edit: to ensure things like 1.005 round correctly, we use
Math.round((num + Number.EPSILON) * 100) / 100
Use Math.round(num * 100) / 100
Edit: to ensure things like 1.005 round correctly, we use
Math.round((num + Number.EPSILON) * 100) / 100
For further actions, you may consider blocking this person and/or reporting abuse
InterSystems Developer -
Ramon Xavier -
Reynaldo Batac -
Sanjay -
Top comments (0)