src/sn-evolution2.c: Clean up the mutation probability a bit.
[sort-networks.git] / src / sn_random.c
index 841b6e4..1c885aa 100644 (file)
@@ -144,4 +144,9 @@ int sn_bounded_random (int min, int max)
   return (rand);
 } /* int sn_bounded_random */
 
+double sn_double_random (void)
+{
+  return (((double) sn_random ()) / (((double) RAND_MAX) + 1.0));
+} /* double sn_double_random */
+
 /* vim: set shiftwidth=2 softtabstop=2 : */