diff options
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; |