summaryrefslogtreecommitdiff
path: root/numlib/rand.h
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2014-09-01 13:56:46 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2014-09-01 13:56:46 +0200
commit22f703cab05b7cd368f4de9e03991b7664dc5022 (patch)
tree6f4d50beaa42328e24b1c6b56b6ec059e4ef21a5 /numlib/rand.h
Initial import of argyll version 1.5.1-8debian/1.5.1-8
Diffstat (limited to 'numlib/rand.h')
-rw-r--r--numlib/rand.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/numlib/rand.h b/numlib/rand.h
new file mode 100644
index 0000000..46f79f2
--- /dev/null
+++ b/numlib/rand.h
@@ -0,0 +1,36 @@
+#ifndef RAND_H
+#define RAND_H
+
+/*
+ * Copyright 1998 Graeme W. Gill
+ * All rights reserved.
+ *
+ * This material is licenced under the GNU AFFERO GENERAL PUBLIC LICENSE Version 3 :-
+ * see the License.txt file for licencing details.
+ */
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+/* Return a random number between 0 and 4294967294 */
+unsigned int
+rand32( /* Return 32 bit random number */
+unsigned int seed); /* Optional seed. Non-zero re-initialized with that seed */
+
+/* Return a random integer in the range min to max inclusive */
+int i_rand(int min, int max);
+
+/* Return a random double in the range min to max inclusive */
+double d_rand(double min, double max);
+
+/* Return a random floating point number with a gausian/normal */
+/* distribution, centered about 0.0, with standard deviation 1.0 */
+/* and an average deviation of 0.564 */
+double norm_rand(void);
+
+#ifdef __cplusplus
+ }
+#endif
+
+#endif /* RAND_H */