UNPKG

@razorpay/blade

Version:

The Design System that powers Razorpay

11 lines (8 loc) 383 B
import count from '../count.js'; import quantile from '../quantile.js'; function thresholdFreedmanDiaconis(values, min, max) { const c = count(values), d = quantile(values, 0.75) - quantile(values, 0.25); return c && d ? Math.ceil((max - min) / (2 * d * Math.pow(c, -1 / 3))) : 1; } export { thresholdFreedmanDiaconis as default }; //# sourceMappingURL=freedmanDiaconis.js.map