source: node_modules/d3-array/src/threshold/sturges.js@ e4c61dd

Last change on this file since e4c61dd was e4c61dd, checked in by istevanoska <ilinastevanoska@…>, 6 months ago

Prototype 1.1

  • Property mode set to 100644
File size: 160 bytes
Line 
1import count from "../count.js";
2
3export 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.