AS _random() question
AS _random() question
- Started
- Last post
- 5 Responses
- level2
With _random(number) you can specify the highest number to randomize to.
Can you specify the lowest number? Like if I wanted to randomize from 500 to 1000?
I'm guessing - _random(500,1000); ?
- Anarchitect0
controlling the random range:
http://www.kirupa.com/developer/…
- level20
you are the man
- ********0
Math.randInt = function (begin, end){
return begin + Math.round(Math.random()*(end-be...
}do
var randNum = Math.random(10,50)
will give you a number between 10 and 50
- tomkat0
500 + random(500);
??
- level20
Math.floor(Math.random() * (high - low)) + low;
aww yeah