MCPcopy Create free account
hub / github.com/idank/explainshell / d3_scale_nice

Function d3_scale_nice

explainshell/web/static/js/d3.v3.js:6370–6381  ·  view source on GitHub ↗
(domain, nice)

Source from the content-addressed store, hash-verified

6368 };
6369 }
6370 function d3_scale_nice(domain, nice) {
6371 var i0 = 0, i1 = domain.length - 1, x0 = domain[i0], x1 = domain[i1], dx;
6372 if (x1 < x0) {
6373 dx = i0, i0 = i1, i1 = dx;
6374 dx = x0, x0 = x1, x1 = dx;
6375 }
6376 if (nice = nice(x1 - x0)) {
6377 domain[i0] = nice.floor(x0);
6378 domain[i1] = nice.ceil(x1);
6379 }
6380 return domain;
6381 }
6382 function d3_scale_polylinear(domain, range, uninterpolate, interpolate) {
6383 var u = [], i = [], j = 0, k = Math.min(domain.length, range.length) - 1;
6384 if (domain[k] < domain[0]) {

Callers 4

d3_scale_linearFunction · 0.85
d3_scale_logFunction · 0.85
d3_scale_powFunction · 0.85
d3_time_scaleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected