@@ -11,67 +11,67 @@ private Randomized()
1111 }
1212
1313 // 3 out of 5 => [ 0 1 2 ] 3 4
14- public static Boolean chance (Integer valid , Integer outOf )
14+ public static boolean chance (int valid , int outOf )
1515 {
1616 return (nextInt (outOf ) < valid );
1717 }
1818
19- public static Boolean chance (Integer outOf )
19+ public static boolean chance (int outOf )
2020 {
2121 return (nextInt (outOf ) == 0 );
2222 }
2323
24- public static Integer of (Integer min , Integer max )
24+ public static int of (int min , int max )
2525 {
2626 return nextInt ((max - min ) + 1 ) + min ;
2727 }
2828
29- public static Integer nextInt ()
29+ public static int nextInt ()
3030 {
3131 return random .nextInt ();
3232 }
3333
34- public static Integer nextInt (Integer max )
34+ public static int nextInt (int max )
3535 {
3636 return random .nextInt (max );
3737 }
3838
39- public static Long nextLong ()
39+ public static long nextLong ()
4040 {
4141 return random .nextLong ();
4242 }
4343
44- public static Double nextDouble ()
44+ public static double nextDouble ()
4545 {
4646 return random .nextDouble ();
4747 }
4848
49- public static Double nextDouble (Integer places )
49+ public static double nextDouble (int places )
5050 {
5151 return nextDouble () * Math .pow (10 , places );
5252 }
5353
54- public static Double nextDouble (Double max )
54+ public static double nextDouble (double max )
5555 {
5656 return nextDouble () * max ;
5757 }
5858
59- public static Double nextSignedDouble ()
59+ public static double nextSignedDouble ()
6060 {
6161 return nextDouble () * sign ();
6262 }
6363
64- public static Double nextSignedDouble (Double max )
64+ public static double nextSignedDouble (double max )
6565 {
6666 return nextDouble (max ) * sign ();
6767 }
6868
69- public static Integer sign ()
69+ public static int sign ()
7070 {
7171 return (nextBoolean () ? 1 : -1 );
7272 }
7373
74- public static Boolean nextBoolean ()
74+ public static boolean nextBoolean ()
7575 {
7676 return random .nextBoolean ();
7777 }
0 commit comments