aboutsummaryrefslogtreecommitdiff
path: root/src/stable/random.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2012-11-05 22:41:51 +0000
committerMike Buland <eichlan@xagasoft.com>2012-11-05 22:41:51 +0000
commitec05778d5718a7912e506764d443a78d6a6179e3 (patch)
tree78a9a01532180030c095acefc45763f07c14edb8 /src/stable/random.cpp
parentb20414ac1fe80a71a90601f4cd1767fa7014a9ba (diff)
downloadlibbu++-ec05778d5718a7912e506764d443a78d6a6179e3.tar.gz
libbu++-ec05778d5718a7912e506764d443a78d6a6179e3.tar.bz2
libbu++-ec05778d5718a7912e506764d443a78d6a6179e3.tar.xz
libbu++-ec05778d5718a7912e506764d443a78d6a6179e3.zip
Converted tabs to spaces with tabconv.
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