MCPcopy Create free account
hub / github.com/crawl/crawl / decimal_chance

Function decimal_chance

crawl-ref/source/random.cc:454–457  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

452}
453
454bool decimal_chance(double chance)
455{
456 return random_real() < chance;
457}
458
459// This is used when the front-end randomness is inconclusive. There are
460// never more than two possibilities, which simplifies things.

Callers 2

stepdownFunction · 0.85
bernoulliFunction · 0.85

Calls 1

random_realFunction · 0.85

Tested by

no test coverage detected