MCPcopy Create free account
hub / github.com/microsoft/SandDance / ticks1

Function ticks1

docs/app/js/sanddance-app.js:112165–112174  ·  view source on GitHub ↗
(start, stop, count)

Source from the content-addressed store, hash-verified

112163 ]
112164 ];
112165 function ticks1(start, stop, count) {
112166 const reverse = stop < start;
112167 if (reverse) [start, stop] = [
112168 stop,
112169 start
112170 ];
112171 const interval = count && typeof count.range === "function" ? count : tickInterval(start, stop, count);
112172 const ticks = interval ? interval.range(start, +stop + 1) : []; // inclusive stop
112173 return reverse ? ticks.reverse() : ticks;
112174 }
112175 function tickInterval(start, stop, count) {
112176 const target = Math.abs(stop - start) / count;
112177 const i = (0, _d3Array.bisector)(([, , step])=>step).right(tickIntervals, target);

Callers

nothing calls this directly

Calls 1

tickIntervalFunction · 0.70

Tested by

no test coverage detected