aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/ode-0.9/OPCODE/Ice/IceRandom.cpp
diff options
context:
space:
mode:
authordan miller2007-10-19 05:20:07 +0000
committerdan miller2007-10-19 05:20:07 +0000
commitfca74b0bf0a0833f5701e9c0de7b3bc15b2233dd (patch)
tree51bcae7a1b8381a6bf6fd8025a7de1e30fe0045d /libraries/ode-0.9/OPCODE/Ice/IceRandom.cpp
parentresubmitting ode (diff)
downloadopensim-SC_OLD-fca74b0bf0a0833f5701e9c0de7b3bc15b2233dd.zip
opensim-SC_OLD-fca74b0bf0a0833f5701e9c0de7b3bc15b2233dd.tar.gz
opensim-SC_OLD-fca74b0bf0a0833f5701e9c0de7b3bc15b2233dd.tar.bz2
opensim-SC_OLD-fca74b0bf0a0833f5701e9c0de7b3bc15b2233dd.tar.xz
dont ask
Diffstat (limited to 'libraries/ode-0.9/OPCODE/Ice/IceRandom.cpp')
-rw-r--r--libraries/ode-0.9/OPCODE/Ice/IceRandom.cpp35
1 files changed, 0 insertions, 35 deletions
diff --git a/libraries/ode-0.9/OPCODE/Ice/IceRandom.cpp b/libraries/ode-0.9/OPCODE/Ice/IceRandom.cpp
deleted file mode 100644
index cc63a04..0000000
--- a/libraries/ode-0.9/OPCODE/Ice/IceRandom.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
1///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2/**
3 * Contains code for random generators.
4 * \file IceRandom.cpp
5 * \author Pierre Terdiman
6 * \date August, 9, 2001
7 */
8///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
9
10///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
11// Precompiled Header
12#include "Stdafx.h"
13
14using namespace IceCore;
15
16void IceCore:: SRand(udword seed)
17{
18 srand(seed);
19}
20
21udword IceCore::Rand()
22{
23 return rand();
24}
25
26
27static BasicRandom gRandomGenerator(42);
28
29udword IceCore::GetRandomIndex(udword max_index)
30{
31 // We don't use rand() since it's limited to RAND_MAX
32 udword Index = gRandomGenerator.Randomize();
33 return Index % max_index;
34}
35