Hi friends, Is there any Generalized Formula for producing numbers from Math.random(). For example, generate numbers from 3 to 8 by using Math.random() Regards, Hassan.
Hi Trevor & Dave. I mean, can we make a generalized formula for generating numbers with our rquired range.Something like this. (int)(Math.random() * lower limit )+ upper limit.. where lower limit is in my first post is 3 & upper limit is 8. That is have a generalized formula in which i have to just put lower & upper limts. Regards, Hassan.
Always Belive On Logic!!
That's a very big dog. I think I want to go home now and hug this tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth