uniform

fun <T : LinearType<T>> LinearRange1D<T>.uniform(random: Random = Random.Default): T(source)

Generates a uniformly distributed random value within the range.

Return

A value of type T sampled uniformly within the range.

Parameters

random

The random number generator to use for generating the value. Defaults to Random.Default.


fun <T : LinearType<T>> LinearRange2D<T>.uniform(random: Random = Random.Default): T(source)

Generates a random value within the 2D linear range based on a uniform distribution.

Return

A randomly generated value of type T within the linear range.

Parameters

random

The random number generator to use for producing random values, defaults to Random.Default.


fun <T : LinearType<T>> LinearRange3D<T>.uniform(random: Random = Random.Default): T(source)

Generates a uniform random value within the 3D linear range, based on the given random number generator.

Return

A randomly generated value of type T within the 3D linear range.

Parameters

random

The random number generator to use for generating random values. Defaults to Random.Default.


fun <T : LinearType<T>> LinearRange4D<T>.uniform(random: Random = Random.Default): T(source)

Generates a value of type T uniformly distributed within the 4D linear range.

Return

A uniformly distributed value of type T within the 4D range.

Parameters

random

The random number generator to use. Defaults to Random.Default.