Package-level declarations

Functions

Link copied to clipboard
fun <T : LinearType<T>> SimplexRange2D<T>.uniform(random: Random): T

Generates a uniformly distributed value within the SimplexRange2D.

fun <T : LinearType<T>> SimplexRange3D<T>.uniform(random: Random): T

Generates a uniformly distributed value within the 3D simplex range.

fun <T : LinearType<T>> SimplexRange4D<T>.uniform(random: Random): T

Generates a uniformly distributed value within the 4D simplex range using a random generator.

Link copied to clipboard
fun <T : LinearType<T>> SimplexRange2D<T>.uniformCube(random: Random): T

Generates a random point within the simplex represented by the SimplexRange2D, forming an interpolation of the three control points x0, x1, x2 using a weighted random combination normalized to sum to 1.

fun <T : LinearType<T>> SimplexRange3D<T>.uniformCube(random: Random): T

Generates a random point within the simplex represented by the SimplexRange3D, forming an interpolation of the four control points using a weighted random combination normalized to sum to 1.

fun <T : LinearType<T>> SimplexRange4D<T>.uniformCube(random: Random): T

Generates a random point within the simplex represented by the SimplexRange4D, forming an interpolation of the five control points using a weighted random combination normalized to sum to 1.

Link copied to clipboard
fun <T : LinearType<T>> SimplexRange2D<T>.uniformPower(exp: Double, random: Random = Random.Default): T

Generates a uniformly distributed value within the SimplexRange2D.

Link copied to clipboard
fun <T : LinearType<T>> List<T>.uniformSimplex(random: Random = Random.Default, biasOrder: Int = 0, biasAmount: Double = 0.0): T

Generates a random value within the convex hull of the elements in the list using a uniform distribution over the simplex formed by the elements, optionally applying bias to the distribution.