source: node_modules/d3-random/src/logistic.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: 392 bytes
Line 
1import defaultSource from "./defaultSource.js";
2
3export default (function sourceRandomLogistic(source) {
4 function randomLogistic(a, b) {
5 a = a == null ? 0 : +a;
6 b = b == null ? 1 : +b;
7 return function() {
8 var u = source();
9 return a + b * Math.log(u / (1 - u));
10 };
11 }
12
13 randomLogistic.source = sourceRandomLogistic;
14
15 return randomLogistic;
16})(defaultSource);
Note: See TracBrowser for help on using the repository browser.