summaryrefslogtreecommitdiff
path: root/src/common/random.h
diff options
context:
space:
mode:
authorai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-07-10 06:17:06 +0000
committerai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-07-10 06:17:06 +0000
commit9ef634559f3cde232586b1dc6fd00bea3f3d8e53 (patch)
tree541295af8a6fbfe15b09da353680be6dd4d6b3ff /src/common/random.h
parent9c100697bf79604fcef8b7eedbadeed45c63b41b (diff)
downloadhercules-9ef634559f3cde232586b1dc6fd00bea3f3d8e53.tar.gz
hercules-9ef634559f3cde232586b1dc6fd00bea3f3d8e53.tar.bz2
hercules-9ef634559f3cde232586b1dc6fd00bea3f3d8e53.tar.xz
hercules-9ef634559f3cde232586b1dc6fd00bea3f3d8e53.zip
* Merged changes from trunk [14827:14894/trunk].
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/renewal@14895 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/common/random.h')
-rw-r--r--src/common/random.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/common/random.h b/src/common/random.h
new file mode 100644
index 000000000..59b609464
--- /dev/null
+++ b/src/common/random.h
@@ -0,0 +1,18 @@
+// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
+// For more information, see LICENCE in the main folder
+
+#ifndef _RANDOM_H_
+#define _RANDOM_H_
+
+#include "../common/cbasetypes.h"
+
+void rnd_init(void);
+void rnd_seed(uint32);
+
+uint32 rnd(void);// [0, UINT32_MAX]
+uint32 rnd_roll(uint32 dice_faces);// [0, dice_faces)
+int32 rnd_value(int32 min, int32 max);// [min, max]
+double rnd_uniform(void);// [0.0, 1.0)
+double rnd_uniform53(void);// [0.0, 1.0)
+
+#endif /* _RANDOM_H_ */