source:
node_modules/d3-array/src/threshold/sturges.js@
e4c61dd
| Last change on this file since e4c61dd was e4c61dd, checked in by , 6 months ago | |
|---|---|
|
|
| File size: 160 bytes | |
| Line | |
|---|---|
| 1 | import count from "../count.js"; |
| 2 | |
| 3 | export default function thresholdSturges(values) { |
| 4 | return Math.max(1, Math.ceil(Math.log(count(values)) / Math.LN2) + 1); |
| 5 | } |
Note:
See TracBrowser
for help on using the repository browser.
