MCPcopy Create free account
hub / github.com/NetHack/NetHack / rnz

Function rnz

src/rnd.c:213–229  ·  view source on GitHub ↗

rnz: everyone's favorite! */

Source from the content-addressed store, hash-verified

211
212/* rnz: everyone's favorite! */
213int
214rnz(int i)
215{
216 long x = (long) i;
217 long tmp = 1000L;
218
219 tmp += rn2(1000);
220 tmp *= rne(4);
221 if (rn2(2)) {
222 x *= tmp;
223 x /= 1000;
224 } else {
225 x *= 1000;
226 x /= tmp;
227 }
228 return (int) x;
229}
230
231/* Sets the seed for the random number generator */
232#ifdef USE_ISAAC64

Callers 8

dodownFunction · 0.85
arti_invoke_costFunction · 0.85
arti_invokeFunction · 0.85
angrygodsFunction · 0.85
pleasedFunction · 0.85
bestow_artifactFunction · 0.85
prayer_doneFunction · 0.85
start_corpse_timeoutFunction · 0.85

Calls 2

rn2Function · 0.85
rneFunction · 0.85

Tested by

no test coverage detected