Skip to main content

Module rand

Module rand 

Source
Expand description

Implementations and uses of Pseudo-RNG in Geometry Dash.

Functions§

check_seed_advanced_random
Determines the group that an advanced random trigger will activate based on an input seed and a list of the trigger’s activation probabilities per group as a GDValue::ProbabilitiesList.
check_seed_random
Checks if the seed will activate group 1 or 2 in a random trigger. The chance must be given as a float in the range [0.0, 1.0]. The function returns true if the group 1 will be activated, and false if group 2 will be activated.
fast_rand_bits
Function used by GD to generate a new seed. Internally known as fast_rand_0_1. Unlike the actual PRNG used in GD, this function DOES NOT automatically update the seed.
fast_rand_bits_norm
Utility function which normalises result from fast_rand_bits to the range [0.0, 1.0].
next_seed
Determines the next seed from a starting seed as generated in Geometry Dash.
next_seed_mut
Mutating version of next_seed