From: Karryanna Date: Wed, 13 May 2015 16:49:13 +0000 (+0200) Subject: Labelling: randdouble implementation X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=b54512ef7fcbb57d7e3a088c75d75688b2af4016;p=leo.git Labelling: randdouble implementation --- diff --git a/labeller.c b/labeller.c index 007620a..f2792ee 100644 --- a/labeller.c +++ b/labeller.c @@ -1710,8 +1710,7 @@ int flip(int a, int b) double randdouble(void) { - // FIXME: How the hell shall double in range <0, 1> be generated? O:) - return 0.5; + return ((double) rand() / (double) RAND_MAX); } void cleanup(void)