uniformSequence

fun Vector2.Companion.uniformSequence(rect: Rectangle, random: Random = Random.Default): Sequence<Vector2>(source)

Generates an infinite sequence of random Vector2 points uniformly distributed within the specified rectangle.

Return

A sequence of Vector2 points uniformly distributed within the specified rectangle.

Parameters

rect

The rectangle within which the random Vector2 points will be generated.

random

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