Skip to content
FutureBlitz

    Install

    Import std.math.random

    RandInt

    std.math.random

    function

    @PanicsAtCaller Public Function RandInt(count: Int): Int

    An Int from 0 to count - 1, each as likely, from this thread's default generator. A count that isn't above 0 panics.

    std/math/random.fb, line 422

    function

    @PanicsAtCaller Public Function RandInt(low: Int, high: Int): Int

    An Int from low to high, both included, each as likely, from this thread's default generator: RandInt(1, 6) rolls a die. A low above high panics.

    Examples

    SeedRandom(7)
    Local first = RandInt(1, 100)
    SeedRandom(7)
    Expect(RandInt(1, 100) == first)

    std/math/random.fb, line 440

    Report an issue with this page or with FutureBlitz on GitHub.