Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src/math
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-07-31 12:43:43 +0000
committerStijn Buys <ingar@osirion.org>2008-07-31 12:43:43 +0000
commit3da609588ad6fe7eb0581e4678a2ec8c6c1c4a18 (patch)
tree6824ff50935275424156f34fd5ec7912c1f4b055 /src/math
parent02f6bfcef4f2e8b0fdbf12c652ab202edbeed19a (diff)
more heisenbugs fixes
Diffstat (limited to 'src/math')
-rw-r--r--src/math/functions.cc5
1 files changed, 3 insertions, 2 deletions
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 <stdlib.h>
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)