diff options
author | Adam Borowski <kilobyte@angband.pl> | 2013-10-06 17:00:22 +0200 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2013-10-06 17:00:22 +0200 |
commit | 4ee4bd8e3265b59996e467dcd555a7bccad1f9ee (patch) | |
tree | a444c9d537ff5f985ecc7a48e010c5bfc656bb12 /crawl-ref/source/random.h | |
parent | 6cfc1f2ff4dbf4ade01828aca2c2d1cd9c3029ea (diff) | |
download | crawl-ref-4ee4bd8e3265b59996e467dcd555a7bccad1f9ee.tar.gz crawl-ref-4ee4bd8e3265b59996e467dcd555a7bccad1f9ee.zip |
Don't wrap low-level RNG calls twice.
random.cc wrapped rng.cc, rng.cc wrapped asg.cc. The middle level did
nothing but pass calls as-is.
Diffstat (limited to 'crawl-ref/source/random.h')
-rw-r--r-- | crawl-ref/source/random.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crawl-ref/source/random.h b/crawl-ref/source/random.h index 51dd5dd628..ad7e971420 100644 --- a/crawl-ref/source/random.h +++ b/crawl-ref/source/random.h @@ -6,6 +6,9 @@ #include <map> #include <vector> +void seed_rng(); +void seed_rng(uint32_t seed); + bool coinflip(); int div_rand_round(int num, int den); int div_round_up(int num, int den); @@ -17,6 +20,7 @@ int maybe_random_div(int nom, int denom, bool random_factor); int maybe_roll_dice(int num, int size, bool random); int random_range(int low, int high); int random_range(int low, int high, int nrolls); +uint32_t random_int(); double random_real(); double random_real_inc(); double random_real_avg(int rolls); |