Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
90
uint64_t RandomSource::randUInt(uint64_t max) {
91
uint64_t denom = (uint64_t)(-1) / ((uint64_t)max + 1);
92
return randu64() / denom;
93
}
94
95
int64_t RandomSource::randInt(int64_t min, int64_t max) {
96
if (max < min)
Callers
6
processRule
Method · 0.80
produceConstellations
Method · 0.80
init
Method · 0.80
randUInt
Function · 0.80
make
Method · 0.80
TEST
Function · 0.80
Calls
3
randu64
Function · 0.85
StarException
Class · 0.85
randUInt
Function · 0.85
Tested by
1
TEST
Function · 0.64