MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / RandRange

Method RandRange

src/script/api/script_base.cpp:26–30  ·  view source on GitHub ↗

static */

Source from the content-addressed store, hash-verified

24}
25
26/* static */ SQInteger ScriptBase::RandRange(SQInteger max)
27{
28 max = Clamp<SQInteger>(max, 0, UINT32_MAX);
29 return ScriptObject::GetRandomizer().Next(max);
30}
31
32/* static */ SQInteger ScriptBase::RandRangeItem(SQInteger, SQInteger max)
33{

Callers

nothing calls this directly

Calls 1

NextMethod · 0.45

Tested by

no test coverage detected