summaryrefslogtreecommitdiff
path: root/AutoVideos/src/Windows/Random.h
diff options
context:
space:
mode:
authorpommicket <leonardomtenenbaum@gmail.com>2016-02-28 13:12:20 -0500
committerpommicket <leonardomtenenbaum@gmail.com>2016-02-28 13:12:20 -0500
commitcdde99ac0fdbcad1133e9482c8a6d283c7842a5b (patch)
treebb6dc0a6b60ef0fdcc610d48b3dd2c6418603ed8 /AutoVideos/src/Windows/Random.h
parent487adb199603d0dd009dd626f569435eb6bcd36a (diff)
Created AutoArt
Diffstat (limited to 'AutoVideos/src/Windows/Random.h')
-rw-r--r--AutoVideos/src/Windows/Random.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/AutoVideos/src/Windows/Random.h b/AutoVideos/src/Windows/Random.h
new file mode 100644
index 0000000..80d0259
--- /dev/null
+++ b/AutoVideos/src/Windows/Random.h
@@ -0,0 +1,9 @@
+double rand01()
+{
+ return (double)rand() / RAND_MAX;
+}
+
+int randrange(int start, int end)
+{
+ return (int)(rand01()*(end-start)) + start;
+}