uniformSub

fun Box.uniformSub(minWidth: Double = 0.0, maxWidth: Double = 1.0, minHeight: Double = 0.0, maxHeight: Double = 1.0, minDepth: Double = 0.0, maxDepth: Double = 1.0, random: Random = Random.Default): Box(source)

Generates a uniformly distributed sub-box based on random parameters within specified ranges.

Return

A new Box that represents the sub-box.

Parameters

minWidth

The minimum width of the sub-box. Defaults to 0.0.

maxWidth

The maximum width of the sub-box. Defaults to 1.0.

minHeight

The minimum height of the sub-box. Defaults to 0.0.

maxHeight

The maximum height of the sub-box. Defaults to 1.0.

minDepth

The minimum depth of the sub-box. Defaults to 0.0.

maxDepth

The maximum depth of the sub-box. Defaults to 1.0.

random

The Random instance used for generating random values. Defaults to Random.Default.


fun Rectangle.uniformSub(minWidth: Double = 0.0, maxWidth: Double = 1.0, minHeight: Double = 0.0, maxHeight: Double = 1.0, random: Random = Random.Default): Rectangle(source)

Generates a uniformly distributed sub-rectangle based on random parameters within specified ranges.

Return

A new Rectangle that represents the sub-rectangle.

Parameters

minWidth

The minimum width of the sub-rectangle. Defaults to 0.0.

maxWidth

The maximum width of the sub-rectangle. Defaults to 1.0.

minHeight

The minimum height of the sub-rectangle. Defaults to 0.0.

maxHeight

The maximum height of the sub-rectangle. Defaults to 1.0.

random

The Random instance used for generating random values.