Array.random()

Revision as of 15:30, 4 March 2017 by Joseph (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Array.random(Base,Count)

Fill the array with random numbers (generated using Base (default 1) as the base value), and each element will have Count (default 1) number of elements. Same as Array.rand()

1..10.random()

0.9076147301889648
0.22221278993188087
0.9074005305963753
0.21449548347852154
0.9662694660694406
0.3521110238420868
0.21188613083133245
0.18745361554231343
0.8020043745274368
0.6885840958842344


1..10.random(10,3)

5.306017294137677 7.009186655574846 9.793005553506745
3.3922765369273455 3.5729181833790125 2.2107658035830546
9.142474435906704 7.672749640109087 1.7576394508285764
5.3161494227621215 5.56985342627817 3.5405368036623375
8.687057435205936 9.66286840580721 1.7359435228043174
3.656781898356398 4.2944625080121 2.1161163801381266
8.077420030867428 7.309757298401276 9.2377853274827
3.0997692038245117 4.861847323298296 6.209544601371966
0.22341949649689052 3.7236857871916618 7.395255427558347
1.3188704643932847 1.6097095508831427 9.707731398504391