lovr.math.randomNormal

Edit

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

NameTypeDefaultDescription
sigmanumber1 The standard deviation of the distribution. This can be thought of how "wide" the range of numbers is or how much variability there is.
munumber0 The average value returned.

Returns

NameTypeDescription
xnumber A normally distributed pseudo-random number.

See also