diff options
Diffstat (limited to '')
-rw-r--r-- | src/stable/random.cpp | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/stable/random.cpp b/src/stable/random.cpp index 725948a..63416bf 100644 --- a/src/stable/random.cpp +++ b/src/stable/random.cpp | |||
@@ -20,13 +20,28 @@ Bu::Random::~Random() | |||
20 | pGen = NULL; | 20 | pGen = NULL; |
21 | } | 21 | } |
22 | 22 | ||
23 | void Bu::Random::seed( int32_t iSeed ) | ||
24 | { | ||
25 | getInstance().pGen->seed( iSeed ); | ||
26 | } | ||
27 | |||
23 | int32_t Bu::Random::rand() | 28 | int32_t Bu::Random::rand() |
24 | { | 29 | { |
25 | return getInstance().pGen->rand(); | 30 | return getInstance().pGen->rand(); |
26 | } | 31 | } |
27 | 32 | ||
28 | void Bu::Random::seed( int32_t iSeed ) | 33 | int32_t Bu::Random::rand( int32_t iMax ) |
29 | { | 34 | { |
30 | getInstance().pGen->seed( iSeed ); | 35 | return getInstance().pGen->rand( iMax ); |
36 | } | ||
37 | |||
38 | int32_t Bu::Random::rand( int32_t iMin, int32_t iMax ) | ||
39 | { | ||
40 | return getInstance().pGen->rand( iMin, iMax ); | ||
41 | } | ||
42 | |||
43 | double Bu::Random::randNorm() | ||
44 | { | ||
45 | return getInstance().pGen->randNorm(); | ||
31 | } | 46 | } |
32 | 47 | ||