View Source Exray.Core.Random (Exray v0.6.0)

Generate random numbers, set the seed of Raylib

Summary

Functions

Get a random value between min and max (both included)

Load random values sequence, no values repeated

Set the seed for the random number generator

Unload random values sequence

Functions

Link to this function

get_random_value(min, max)

View Source
@spec get_random_value(min :: integer(), max :: integer()) ::
  random_value :: integer()

Get a random value between min and max (both included)

Link to this function

load_random_sequence(count, min, max)

View Source
@spec load_random_sequence(
  count :: non_neg_integer(),
  min :: integer(),
  max :: integer()
) ::
  random_sequence :: [integer()]

Load random values sequence, no values repeated

@spec set_random_seed(seed :: non_neg_integer()) :: :ok

Set the seed for the random number generator

Link to this function

unload_random_sequence(sequence)

View Source
@spec unload_random_sequence(sequence :: [integer()]) :: :ok

Unload random values sequence