jamesbloomer / node-ziggurat

A javascript implementation of the Ziggurat algorithm for generating Normally-distributed numbers
MIT License
3 stars 1 forks source link

Custom mean? #2

Open tommedema opened 6 years ago

tommedema commented 6 years ago

I expect the mean of this normal distribution is 0.5?

Is it possible to specify a custom mean, and perhaps even a skewness?

jamesbloomer commented 6 years ago

I haven't looked at this for five years(!) however the original code was from https://www.filosophy.org/code/normal-distributed-random-values-in-javascript-using-the-ziggurat-algorithm/ and the algorithm is outlined https://en.wikipedia.org/wiki/Ziggurat_algorithm

Happy to take PRs :-)