uniforms

fun Double.Companion.uniforms(count: Int, min: Double = -1.0, max: Double = 1.0, random: Random = Random.Default): List<Double>(source)

Generates a list of random double values within the specified range.

Return

A list of random double values within the specified range.

Parameters

count

The number of random double values to generate.

min

The minimum value (inclusive) of the range. Default is -1.0.

max

The maximum value (exclusive) of the range. Default is 1.0.

random

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


fun Vector2.Companion.uniforms(count: Int, min: Vector2 = -ONE, max: Vector2 = ONE, random: Random = Random.Default): List<Vector2>(source)

Generates a list of Vector2 instances, each initialized with random values within the specified range.

Return

A list of randomly generated Vector2 instances.

Parameters

count

The number of Vector2 instances to generate.

min

The minimum range for the random Vector2 values. Defaults to -ONE.

max

The maximum range for the random Vector2 values. Defaults to ONE.

random

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


fun Vector2.Companion.uniforms(count: Int, rect: Rectangle, random: Random = Random.Default): List<Vector2>(source)

Generates a list of uniformly distributed random points within a specified rectangular area.

Return

A list of Vector2 objects representing the generated random points.

Parameters

count

The number of random points to generate.

rect

The rectangular area within which the points will be generated.

random

The random number generator to use for point generation. Defaults to Random.Default.


fun Vector3.Companion.uniforms(count: Int, min: Double = -1.0, max: Double = 1.0, random: Random = Random.Default): List<Vector3>(source)

Generates a list of uniformly distributed random Vector3 instances.

Return

A list of uniformly distributed random Vector3 instances.

Parameters

count

The number of Vector3 instances to generate.

min

The minimum value for each component of the Vector3. Defaults to -1.0.

max

The maximum value for each component of the Vector3. Defaults to 1.0.

random

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


fun Vector3.Companion.uniforms(count: Int, min: Vector3 = -ONE, max: Vector3 = ONE, random: Random = Random.Default): List<Vector3>(source)

Generates a list of uniformly distributed random Vector3 instances.

Return

A list of uniformly distributed random Vector3 instances.

Parameters

count

The number of Vector3 instances to generate.

min

The minimum bound for each Vector3 component. Defaults to -ONE.

max

The maximum bound for each Vector3 component. Defaults to ONE.

random

The random number generator used for generating components. Defaults to Random.Default.