MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / randUInt

Method randUInt

source/core/StarRandom.cpp:90–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88}
89
90uint64_t RandomSource::randUInt(uint64_t max) {
91 uint64_t denom = (uint64_t)(-1) / ((uint64_t)max + 1);
92 return randu64() / denom;
93}
94
95int64_t RandomSource::randInt(int64_t min, int64_t max) {
96 if (max < min)

Callers 6

processRuleMethod · 0.80
produceConstellationsMethod · 0.80
initMethod · 0.80
randUIntFunction · 0.80
makeMethod · 0.80
TESTFunction · 0.80

Calls 3

randu64Function · 0.85
StarExceptionClass · 0.85
randUIntFunction · 0.85

Tested by 1

TESTFunction · 0.64