Returns a pseudo-random number from a normal distribution (a bell curve). You can control the center of the bell curve (the mean value) and the overall width (sigma, or standard deviation).
x = lovr.math.randomNormal(sigma, mu)
Arguments
Name | Type | Default | Description |
sigma | number | 1 |
The standard deviation of the distribution. This can be thought of how "wide" the range of numbers is or how much variability there is.
|
mu | number | 0 |
The average value returned.
|
Returns
Name | Type | Description |
x | number |
A normally distributed pseudo-random number.
|
See also