hash

fun ShapeProvider.hash(pointCount: Int, seed: Int, x: Int): List<Vector2>(source)

Generates a list of hashed points based on the shape's triangulation.

Return

A list of vectors representing the hashed points.

Parameters

pointCount

The number of points to generate in the hashed result.

seed

The seed value used for randomization in the hashing process.

x

An additional parameter used in the hashing process to modify randomization.


fun Double.Companion.hash(seed: Int, x: Int, min: Double = -1.0, max: Double = 1.0): Double(source)


fun Vector2.Companion.hash(seed: Int, x: Int, min: Vector2 = -ONE, max: Vector2 = ONE): Vector2(source)

Generates a hash-based 2D vector based on the provided seed, input value, and range constraints.

Parameters

seed

An integer used to initialize the hash generation process, providing variability in the result.

x

The input value used as the basis for generating the hash values.

min

The minimum bounds for both components of the resulting vector. Defaults to -ONE.

max

The maximum bounds for both components of the resulting vector. Defaults to ONE.


fun Vector2.Companion.hash(seed: Int, x: Int, min: Double = -1.0, max: Double = 1.0): Vector2(source)

Generates a 2D hash-based vector using specified seed, input value, and range bounds.

Parameters

seed

An integer seed value for initializing the hash generation.

x

The numerical input value used for generating the hash.

min

The minimum value bound for both vector components. Defaults to -1.0.

max

The maximum value bound for both vector components. Defaults to 1.0.