UNPKG

d2-ui

Version:
6 lines (5 loc) 115 B
d3.round = function(x, n) { return n ? Math.round(x * (n = Math.pow(10, n))) / n : Math.round(x); };