summaryrefslogtreecommitdiff
path: root/src/stable/random.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/stable/random.cpp')
-rw-r--r--src/stable/random.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/stable/random.cpp b/src/stable/random.cpp
index 63416bf..6dca782 100644
--- a/src/stable/random.cpp
+++ b/src/stable/random.cpp
@@ -9,39 +9,39 @@
9#include "bu/randombasic.h" 9#include "bu/randombasic.h"
10 10
11Bu::Random::Random() : 11Bu::Random::Random() :
12 pGen( NULL ) 12 pGen( NULL )
13{ 13{
14 pGen = new RandomBasic(); 14 pGen = new RandomBasic();
15} 15}
16 16
17Bu::Random::~Random() 17Bu::Random::~Random()
18{ 18{
19 delete pGen; 19 delete pGen;
20 pGen = NULL; 20 pGen = NULL;
21} 21}
22 22
23void Bu::Random::seed( int32_t iSeed ) 23void Bu::Random::seed( int32_t iSeed )
24{ 24{
25 getInstance().pGen->seed( iSeed ); 25 getInstance().pGen->seed( iSeed );
26} 26}
27 27
28int32_t Bu::Random::rand() 28int32_t Bu::Random::rand()
29{ 29{
30 return getInstance().pGen->rand(); 30 return getInstance().pGen->rand();
31} 31}
32 32
33int32_t Bu::Random::rand( int32_t iMax ) 33int32_t Bu::Random::rand( int32_t iMax )
34{ 34{
35 return getInstance().pGen->rand( iMax ); 35 return getInstance().pGen->rand( iMax );
36} 36}
37 37
38int32_t Bu::Random::rand( int32_t iMin, int32_t iMax ) 38int32_t Bu::Random::rand( int32_t iMin, int32_t iMax )
39{ 39{
40 return getInstance().pGen->rand( iMin, iMax ); 40 return getInstance().pGen->rand( iMin, iMax );
41} 41}
42 42
43double Bu::Random::randNorm() 43double Bu::Random::randNorm()
44{ 44{
45 return getInstance().pGen->randNorm(); 45 return getInstance().pGen->randNorm();
46} 46}
47 47