uniformsRing

fun Vector2.Companion.uniformsRing(count: Int, innerRadius: Double = 0.0, outerRadius: Double = 1.0, random: Random = Random.Default): List<Vector2>(source)

Generates a list of 2D vectors uniformly distributed within a ring defined by the inner and outer radii.

Return

A list of 2D vectors uniformly distributed within the specified ring.

Parameters

count

The number of vectors to generate.

innerRadius

The inner radius of the ring. Must be less than or equal to outerRadius. Default is 0.0.

outerRadius

The outer radius of the ring. Default is 1.0.

random

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


fun Vector3.Companion.uniformsRing(count: Int, innerRadius: Double = 0.0, outerRadius: Double = 1.0, random: Random = Random.Default): List<Vector3>(source)

Generates a list of uniformly distributed random vectors within a ring defined by inner and outer radii.

Return

A list of randomly generated vectors uniformly distributed within the ring.

Parameters

count

The number of vectors to generate.

innerRadius

The inner radius of the ring. Defaults to 0.0.

outerRadius

The outer radius of the ring. Defaults to 1.0.

random

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