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

Function isaac64_next_uint

src/isaac64.c:166–177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

164}
165
166uint64_t isaac64_next_uint(isaac64_ctx *_ctx,uint64_t _n){
167 uint64_t r;
168 uint64_t v;
169 uint64_t d;
170 do{
171 r=isaac64_next_uint64(_ctx);
172 v=r%_n;
173 d=r-v;
174 }
175 while(((d+_n-1)&ISAAC64_MASK)<d);
176 return v;
177}
178#endif /* USE_ISAAC64 */
179
180/*isaac64.c*/

Callers

nothing calls this directly

Calls 1

isaac64_next_uint64Function · 0.85

Tested by

no test coverage detected