Jacmob
Created page with "function parseMmgFloat(x) { var _x = parseFloat(x); if (isNaN(_x)) { return 0; } return _x; } function formatNum(x) { var _x = Math.abs(x); if (_x > 99) { // if over 100 // round to 0 dp and format with commas if needed _x = Math.round(x); _x = _x.toLocaleString('en'); } else if (_x < 0.1) { // if under 0.1 // round to 2 sf var n = Math.floor(Math.log10(x)) - 1; _x = Math.pow(10, n) * Math.round(x/Math.pow(10,n)); // cull binary representat..."