Files
url_tracker_tool/node_modules/d3-random/src/weibull.js
Andrei 58f8093689 Rebrand from 'Redirect Intelligence v2' to 'URL Tracker Tool V2' throughout UI
- Updated all component headers and documentation
- Changed navbar and footer branding
- Updated homepage hero badge
- Modified page title in index.html
- Simplified footer text to 'Built with ❤️'
- Consistent V2 capitalization across all references
2025-08-19 19:12:23 +00:00

23 lines
535 B
JavaScript

import defaultSource from "./defaultSource.js";
export default (function sourceRandomWeibull(source) {
function randomWeibull(k, a, b) {
var outerFunc;
if ((k = +k) === 0) {
outerFunc = x => -Math.log(x);
} else {
k = 1 / k;
outerFunc = x => Math.pow(x, k);
}
a = a == null ? 0 : +a;
b = b == null ? 1 : +b;
return function() {
return a + b * outerFunc(-Math.log1p(-source()));
};
}
randomWeibull.source = sourceRandomWeibull;
return randomWeibull;
})(defaultSource);