diff options
Diffstat (limited to '')
| -rw-r--r-- | src/stable/random.cpp | 18 |
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 | ||
| 11 | Bu::Random::Random() : | 11 | Bu::Random::Random() : |
| 12 | pGen( NULL ) | 12 | pGen( NULL ) |
| 13 | { | 13 | { |
| 14 | pGen = new RandomBasic(); | 14 | pGen = new RandomBasic(); |
| 15 | } | 15 | } |
| 16 | 16 | ||
| 17 | Bu::Random::~Random() | 17 | Bu::Random::~Random() |
| 18 | { | 18 | { |
| 19 | delete pGen; | 19 | delete pGen; |
| 20 | pGen = NULL; | 20 | pGen = NULL; |
| 21 | } | 21 | } |
| 22 | 22 | ||
| 23 | void Bu::Random::seed( int32_t iSeed ) | 23 | void Bu::Random::seed( int32_t iSeed ) |
| 24 | { | 24 | { |
| 25 | getInstance().pGen->seed( iSeed ); | 25 | getInstance().pGen->seed( iSeed ); |
| 26 | } | 26 | } |
| 27 | 27 | ||
| 28 | int32_t Bu::Random::rand() | 28 | int32_t Bu::Random::rand() |
| 29 | { | 29 | { |
| 30 | return getInstance().pGen->rand(); | 30 | return getInstance().pGen->rand(); |
| 31 | } | 31 | } |
| 32 | 32 | ||
| 33 | int32_t Bu::Random::rand( int32_t iMax ) | 33 | int32_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 | ||
| 38 | int32_t Bu::Random::rand( int32_t iMin, int32_t iMax ) | 38 | int32_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 | ||
| 43 | double Bu::Random::randNorm() | 43 | double Bu::Random::randNorm() |
| 44 | { | 44 | { |
| 45 | return getInstance().pGen->randNorm(); | 45 | return getInstance().pGen->randNorm(); |
| 46 | } | 46 | } |
| 47 | 47 | ||
