summaryrefslogtreecommitdiff
path: root/src/procgen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/procgen.cpp')
-rw-r--r--src/procgen.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/procgen.cpp b/src/procgen.cpp
index bfff2c4..a57ed3a 100644
--- a/src/procgen.cpp
+++ b/src/procgen.cpp
@@ -32,6 +32,13 @@ void prng_t::unit_vec(float out[2])
out[1] = sin(t);
}
+v2f_t prng_t::unit_vec2(void)
+{
+ float t;
+ t = next_float() * 2.0f * M_PI;
+ return {cos(t), sin(t)};
+}
+
void perlin_noise_t::generate(prng_t *prng, size_t size_)
{
if (table)