You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
425 B
18 lines
425 B
|
4 months ago
|
import defaultSource from "./defaultSource.js";
|
||
|
|
import normal from "./normal.js";
|
||
|
|
|
||
|
|
export default (function sourceRandomLogNormal(source) {
|
||
|
|
var N = normal.source(source);
|
||
|
|
|
||
|
|
function randomLogNormal() {
|
||
|
|
var randomNormal = N.apply(this, arguments);
|
||
|
|
return function() {
|
||
|
|
return Math.exp(randomNormal());
|
||
|
|
};
|
||
|
|
}
|
||
|
|
|
||
|
|
randomLogNormal.source = sourceRandomLogNormal;
|
||
|
|
|
||
|
|
return randomLogNormal;
|
||
|
|
})(defaultSource);
|