aboutsummaryrefslogtreecommitdiff
path: root/src/server/shared/Utilities/Util.h
diff options
context:
space:
mode:
authorChaplain <aionthefirst@gmail.com>2012-01-02 12:38:55 +0300
committerChaplain <aionthefirst@gmail.com>2012-01-02 12:38:55 +0300
commit29c2dfb1dad310b7388685a7020f303b45a6569f (patch)
tree103e5ef5faacdd078b1f86224bd1a9d2c3d6651d /src/server/shared/Utilities/Util.h
parentced346076b335a02a5fc8de8e1bd1dc43ae4e838 (diff)
[Core/Utilities] Implement random generator for float values.
*for mt and sfmt *some codestyle
Diffstat (limited to 'src/server/shared/Utilities/Util.h')
-rwxr-xr-xsrc/server/shared/Utilities/Util.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/server/shared/Utilities/Util.h b/src/server/shared/Utilities/Util.h
index b67761c4977..684b26eea63 100755
--- a/src/server/shared/Utilities/Util.h
+++ b/src/server/shared/Utilities/Util.h
@@ -64,6 +64,9 @@ inline uint32 secsToTimeBitFields(time_t secs)
/* Return a random number in the range 0 .. RAND32_MAX. */
int32 rand32();
+ /* Return a random number in the range min..max */
+ float frand(float min, float max);
+
/* Return a random double from 0.0 to 1.0 (exclusive). Floats support only 7 valid decimal digits.
* A double supports up to 15 valid decimal digits and is used internally (RAND32_MAX has 10 digits).
* With an FPU, there is usually no difference in performance between float and double. */