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

Method randb

source/core/StarRandom.cpp:119–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117}
118
119bool RandomSource::randb() {
120 uint32_t v = gen32();
121 bool parity = false;
122 while (v) {
123 parity = !parity;
124 v = v & (v - 1);
125 }
126 return parity;
127}
128
129void RandomSource::randBytes(char* buf, size_t len) {
130 while (len) {

Callers 9

findRandomWorldMethod · 0.80
updateMethod · 0.80
generateHumanoidMethod · 0.80
randbFunction · 0.80
TESTFunction · 0.80
spreadPressureMethod · 0.80
pressureMoveMethod · 0.80
spreadOverfillMethod · 0.80
levelMoveMethod · 0.80

Calls

no outgoing calls

Tested by 2

generateHumanoidMethod · 0.64
TESTFunction · 0.64