summaryrefslogtreecommitdiff
path: root/common.c
diff options
context:
space:
mode:
authorhorchi <vdr@jwendel.de>2012-11-30 07:45:15 +0100
committerhorchi <vdr@jwendel.de>2012-11-30 07:45:15 +0100
commit68fca5fc8c2fcb462e294ede7379f9bfc0350e29 (patch)
tree370f6ebfa301903dd4873dd1d645c9a5ebf48afa /common.c
parent98b8637fa506ff8d56d68fd38883e151e05d85bf (diff)
parent58250a33a5f60aa415c3b4548096ab3b37368b0a (diff)
downloadvdr-plugin-seduatmo-68fca5fc8c2fcb462e294ede7379f9bfc0350e29.tar.gz
vdr-plugin-seduatmo-68fca5fc8c2fcb462e294ede7379f9bfc0350e29.tar.bz2
Merge branch 'develop' of projects.vdr-developer.org:vdr-plugin-seduatmo into develop
Diffstat (limited to 'common.c')
-rw-r--r--common.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/common.c b/common.c
index d457a6a..17b594b 100644
--- a/common.c
+++ b/common.c
@@ -80,7 +80,7 @@ MsTime msNow()
}
//***************************************************************************
-//
+// Misc. Functions
//***************************************************************************
int minMax(int x, int min, int max)
@@ -94,3 +94,18 @@ int minMax(int x, int min, int max)
return x;
}
+double min(double a, double b)
+{
+ return a < b ? a : b;
+}
+
+double max(double a, double b)
+{
+ return a >= b ? a : b;
+}
+
+int getrand(int min, int max)
+{
+ srand(time(0));
+ return rand() % (max-min) + min;
+}