Closed pvdz closed 8 years ago
It's probably a typo, yet weird that this doesn't trip anyone up.
https://github.com/srikumarks/FD.js/blob/master/fd.js#L190
for (i = 0, len = d.length; i < len; ++i) { if (end < d[i][0]) { result.push([end, d[i][0] - 1]); } end = d[0][1] + 1; }
In this part end is updated to d[0][1]+1 but d[0][1] never changes, and so the assignment is kind of a dud. I'm pretty sure this should be d[i][1]+1.
end
d[0][1]+1
d[0][1]
d[i][1]+1
The problem becomes apparent when using domains of more than one interval with this function.
It's probably a typo, yet weird that this doesn't trip anyone up.
https://github.com/srikumarks/FD.js/blob/master/fd.js#L190
In this part
end
is updated tod[0][1]+1
butd[0][1]
never changes, and so the assignment is kind of a dud. I'm pretty sure this should bed[i][1]+1
.The problem becomes apparent when using domains of more than one interval with this function.