diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2018-03-27 15:54:43 +0200 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2018-03-27 15:54:43 +0200 |
commit | eafbe41b2ceb77f6fcb5f39b80d683d1e8e1e60e (patch) | |
tree | ff866a196250e7737cfbc32c685932b38343795a /src/procgen.cpp | |
parent | e03ca29dcf256cd5c37772b11cd702ca61bf43d7 (diff) |
Rebalance the game - make it slower.
Diffstat (limited to 'src/procgen.cpp')
-rw-r--r-- | src/procgen.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/procgen.cpp b/src/procgen.cpp index 440056a..5cda92e 100644 --- a/src/procgen.cpp +++ b/src/procgen.cpp @@ -40,6 +40,11 @@ float prng_t::next_float(void) return (float)next() / 4294967295.0f; } +float prng_t::next_float(float n, float p) +{ + return remap(0.0f, 1.0f, n, p, next_float()); +} + void prng_t::unit_vec(float out[2]) { float t; |