Package-level declarations

Functions

Link copied to clipboard
fun Box.hash(seed: Int, x: Int): Vector3

Generates a random point inside the boundary of the Box using a hash-based approach.

fun Circle.hash(seed: Int, x: Int): Vector2

Generates a random point within the bounds of the Circle using a hash-based approach.

fun Rectangle.hash(seed: Int, x: Int): Vector2

Generates a random point within the bounds of the Rectangle using a hash-based approach.

fun Triangle.hash(seed: Int, x: Int): Vector2

Generates a random point within the bounds of the Triangle using a hash-based approach.

fun List<Triangle>.hash(count: Int, seed: Int = 0, x: Int = 0): List<Vector2>

Generates a list of random points, distributed across a list of triangles, weighted by their respective areas. The points are generated using a hash-based randomization approach.

Link copied to clipboard
fun Box.uniform(random: Random = Random.Default): Vector3

Generates a uniformly distributed random point inside the Box.

fun Circle.uniform(random: Random = Random.Default): Vector2

Generates a uniformly distributed random point within the Circle.

fun Rectangle.uniform(random: Random = Random.Default): Vector2

Generates a uniformly distributed random point within the Rectangle.

fun Triangle.uniform(random: Random = Random.Default): Vector2

Generates a uniformly distributed random point within the Triangle.

fun List<Triangle>.uniform(count: Int, random: Random = Random.Default): List<Vector2>

Generates a list of 2D points distributed uniformly over a collection of triangles.

Link copied to clipboard
fun Rectangle.uniformSub(minWidth: Double = 0.0, maxWidth: Double = 1.0, minHeight: Double = 0.0, maxHeight: Double = 1.0, random: Random = Random.Default): Rectangle

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

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

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