View Single Post
Random number
Old
aikmin
Senior Member
 
aikmin's Avatar
 
Status: Offline
Posts: 85
Join Date: Mar 2008
Default Random number - 11-08-2011, 02:59 AM

This is not a bug. Random number returns a Double value between 0 and 1 (not including 1). For minimum, Alice simply add the "min value" to the generated number. For maximum, Alice multiply the "max value" with the generated number.

Note: This is not something Alice made up.

Edit: "integerOnly==true" returns the int of the Double value and not the Round to prevent you from getting 1.

random number min=0, max=1, integerOnly=true always return 0

0.12 returns 0
0.55 also returns 0
0.99 also returns 0

By definition of the Random number [ min, max ).

Last edited by aikmin; 11-08-2011 at 03:13 AM.
   
Reply With Quote