aboutsummaryrefslogtreecommitdiff
path: root/src/common/Utilities/Random.h
diff options
context:
space:
mode:
authorNaios <naios-dev@live.de>2016-03-22 19:58:32 +0100
committerNaios <naios-dev@live.de>2016-03-24 01:28:58 +0100
commit501fd9b50232ca3ae3623877c3e521c9c1f894be (patch)
tree073a16994f31aa1ebc28e87b0e9427540f48340a /src/common/Utilities/Random.h
parent183f97005573f499d486613119e7bbb3d5d5318b (diff)
Core/Common: Converted the common library to a shared library.
* There is still the possibility to static link against common.
Diffstat (limited to 'src/common/Utilities/Random.h')
-rw-r--r--src/common/Utilities/Random.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/common/Utilities/Random.h b/src/common/Utilities/Random.h
index dee0bfbfcf0..da3df620af8 100644
--- a/src/common/Utilities/Random.h
+++ b/src/common/Utilities/Random.h
@@ -23,25 +23,25 @@
#include <random>
/* Return a random number in the range min..max. */
-int32 irand(int32 min, int32 max);
+TC_COMMON_API int32 irand(int32 min, int32 max);
/* Return a random number in the range min..max (inclusive). */
-uint32 urand(uint32 min, uint32 max);
+TC_COMMON_API uint32 urand(uint32 min, uint32 max);
/* Return a random millisecond value between min and max seconds. Functionally equivalent to urand(min*IN_MILLISECONDS, max*IN_MILLISECONDS). */
-uint32 urandms(uint32 min, uint32 max);
+TC_COMMON_API uint32 urandms(uint32 min, uint32 max);
/* Return a random number in the range 0 .. UINT32_MAX. */
-uint32 rand32();
+TC_COMMON_API uint32 rand32();
/* Return a random number in the range min..max */
-float frand(float min, float max);
+TC_COMMON_API float frand(float min, float max);
/* Return a random double from 0.0 to 1.0 (exclusive). */
-double rand_norm();
+TC_COMMON_API double rand_norm();
/* Return a random double from 0.0 to 100.0 (exclusive). */
-double rand_chance();
+TC_COMMON_API double rand_chance();
/* Return true if a random roll fits in the specified chance (range 0-100). */
inline bool roll_chance_f(float chance)
@@ -58,7 +58,7 @@ inline bool roll_chance_i(int chance)
/*
* SFMT wrapper satisfying UniformRandomNumberGenerator concept for use in <random> algorithms
*/
-class SFMTEngine
+class TC_COMMON_API SFMTEngine
{
public:
typedef uint32 result_type;