rafaelmaeuer
8/7/2017 - 7:27 AM

Round to at most 2 decimal places (only if necessary) - From https://stackoverflow.com/questions/11832914/round-to-at-most-2-decimal-places-

function roundToTwo(num) {
  return +(Math.round(num + "e+2")  + "e-2");
}