gaussianSequence

fun Random.gaussianSequence(mean: Double = 0.0, standardDeviation: Double = 1.0): Sequence<Double>

Returns an infinite lazy sequence of normally distributed values.

Every element is drawn independently via nextGaussian with the given mean and standardDeviation. The sequence never terminates, so callers must bound it with operators such as take.

Parameters

mean

the center of the distribution, 0.0 by default.

standardDeviation

the spread of the distribution, 1.0 by default, must be non-negative.

Throws