1 module prova.math.random;
2 
3 import std.random;
4 
5 /// Returns a random float within [min, max$(RPAREN)
6 float randomF(float min, float max)
7 {
8   return uniform(min, max);
9 }
10 
11 /// Returns a random float within [0, max$(RPAREN)
12 float randomF(float max)
13 {
14   return uniform(0, max);
15 }
16 
17 /// Returns a random int within [min, max$(RPAREN)
18 int randomI(int min, int max)
19 {
20   return uniform(min, max);
21 }
22 
23 /// Returns a random int within [0, max$(RPAREN)
24 int randomI(int max)
25 {
26   return uniform(0, max);
27 }