From 3da609588ad6fe7eb0581e4678a2ec8c6c1c4a18 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Thu, 31 Jul 2008 12:43:43 +0000 Subject: more heisenbugs fixes --- src/math/functions.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/math') diff --git a/src/math/functions.cc b/src/math/functions.cc index 40f0f4e..2942eb5 100644 --- a/src/math/functions.cc +++ b/src/math/functions.cc @@ -5,6 +5,7 @@ */ #include "math/functions.h" +#include namespace math { @@ -33,12 +34,12 @@ int max(int a, int b) float randomf(const float max) { - return ((float) rand() / (float) RAND_MAX) * max; + return ((float) random() / (float) RAND_MAX) * max; } unsigned randomi(const unsigned int max) { - return ((unsigned int)(rand() % max)); + return ((unsigned int)(random() % max)); } float degrees180f(float angle) -- cgit v1.2.3