Lua
C++
Edit

Random

This function returns a psuedorandom value within the specified range. If no range is specified, the result will be between 0 and 1.

Syntax

Parameter Description
minima minimum value that can be returned
maxima maximum value that can be returned

Returns

Returns a psuedorandom number.

Example

#include "UltraEngine.h"

using namespace UltraEngine;

int main(int argc, const char* argv[])
{
    Seed(Millisecs());

    Print(Random());
    Print(Random(10));
    Print(Random(10, 20));

    return 0;
}
Copyright © 2024 Ultra Software.
All rights reserved.