|
| 12 Feb 2013 09:44 PM |
| Instead of math.huge, is there something like math.small or tiny? If I wanted a random number. but small? |
|
|
| Report Abuse |
|
|
|
| 12 Feb 2013 09:48 PM |
| .00000000000000000000000001 |
|
|
| Report Abuse |
|
|
|
| 12 Feb 2013 09:51 PM |
if you want random
math.random() * .00000000000000000000001 |
|
|
| Report Abuse |
|
|
|
| 12 Feb 2013 09:52 PM |
math.huge just returns a representation of infinity. If you want something like `math.small` meaning the inverse, just use -math.infinity.
However, it sounds to me like what you're looking for is simply the math.random() function. Without any arguments, it will return a number between 0 and 1, or you can input any min or max you'd like to use, allowing for any range of random numbers. |
|
|
| Report Abuse |
|
|
|
| 12 Feb 2013 11:15 PM |
| Yes, math.random() is the way to go, mate. |
|
|
| Report Abuse |
|
|
|
| 12 Feb 2013 11:32 PM |
Math.random(1,4)
numbers equal to or between 1 and 4 |
|
|
| Report Abuse |
|
|
|
| 12 Feb 2013 11:35 PM |
Also for Math.small like equation you could do:
small = 1(10^-math.huge)
|
|
|
| Report Abuse |
|
|