JSFiddle - React, Tailwind, and code Playground
JavaScript
function modRound(value, precision)
{
var precision_number = Math.pow(10, precision);
return Math.round((value+0.00000000001) * precision_number) / precision_number;
}
alert(modRound(0.565, 2))