- 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
23 lines
535 B
JavaScript
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);
|