Round to at most 2 decimal places (only if necessary) - From https://stackoverflow.com/questions/11832914/round-to-at-most-2-decimal-places-only-if-necessary
function roundToTwo(num) { return +(Math.round(num + "e+2") + "e-2"); }