Skip to content

textmode.js / Textmodifier / randomGaussian

Method: randomGaussian()

ts
randomGaussian(mean?, sd?): number;

Return a normally distributed random number.

Values cluster around mean with a standard deviation of sd. When the sketch is created with seed, or after calling randomSeed, this method returns a reproducible sequence.

Parameters

ParameterTypeDescription
mean?numberCenter of the distribution. Defaults to 0.
sd?numberStandard deviation. Defaults to 1.

Returns

number

Gaussian random number.

Example