nice = (n, d=3, p=0) => {
const m = n - Math.floor(n);
const i = (d === 0 && m >= 0.5) ? Math.ceil(n) : Math.floor(n);
let si = i.toString();
while (si.length < p) si = '0' + si;
let sm = (Math.round(m * Math.pow(10, d)) / Math.pow(10, d)).toString().substring(2);
while (sm.length < d) sm += '0';
return si + (d > 0 ? '.' +sm : '');
}