Skip to content
IsaacShelton edited this page Nov 13, 2022 · 6 revisions

random

2.7/random.adept contains utilities for generating random numbers.

Constants

define RANDOM_MAX   = /* ??? */
define RANDOM_RANGE = /* ??? */

Functions

  • func randomize() void

    Initializes random number generation.

    [view src]

  • func random() uint

    Returns a random uint in the range [0, RANDOM_RANGE).

    [view src]

  • func random(upper_exclusive uint) uint

    Returns a random uint in the range [0, upper_exclusive).

    [view src]

  • func random(lower_inclusive, upper_exclusive uint) uint

    Returns a random uint in the range [lower_inclusive, upper_exclusive).

    [view src]

  • func normalizedRandom() double

    Returns a random double in the range [0.0, 1.0).

    [view src]

  • func randomSetSeed(seed uint) void

    Sets the seed used to generate random numbers.

    [view src]

  • func randomInt(upper_exclusive int) int

    Returns a random int in the range [0, upper_exclusive).

    [view src]

  • func randomInt(lower_inclusive, upper_exclusive int) int

    Returns a random int in the range [lower_inclusive, upper_exclusive).

    [view src]

Settings

#default random_use_mt19937 true
Clone this wiki locally