Page 1 of 1
Random Numbers
Posted: Fri Jun 11, 2010 8:32 am
by Eradani
what are we using for random number generation? is it in C++ or LUA
(couldn't find anything in
http://www.eq2emulator.net/wiki/index.p ... _Functions concerning random numbers)
what is it returning?
a) random() = float 0.0 .. 0.999999999
b) random(10) = 1..10
c) random(10) = 0..9
d) random(7, 14) = 7..14
Re: Random Numbers
Posted: Fri Jun 11, 2010 1:32 pm
by Scatman
It depends where you want to use it. In the server code you can use rand(). I also remember I implemented at least one random number generating function in common/miscfunctions.cpp. In LUA you can use math.random().
Re: Random Numbers
Posted: Sat Jun 12, 2010 7:35 am
by Eradani
sorry, must have been 1/2 asleep when i asked this. found the
Lua Reference manual and, of course at the bottom of a pile of books, my [url=desk://topOfPile.Books]C++ manual[/url].
Re: Random Numbers
Posted: Sat Jun 12, 2010 10:27 am
by Scatman
Re: Random Numbers
Posted: Sat Jun 12, 2010 10:57 am
by Eradani
hehe, you didn't look at the link for
Eradani wrote:my [url=desk://topOfPile.Books]C++ manual[/url].
Re: Random Numbers
Posted: Sat Jun 12, 2010 11:11 am
by Zcoretri
Eradani wrote:hehe, you didn't look at the link for
Eradani wrote:my [url=desk://topOfPile.Books]C++ manual[/url].
Invalid link for me url=desk:topOfPile.Books
Re: Random Numbers
Posted: Tue Jun 15, 2010 1:49 pm
by John Adams
These guys are kinda thick, huh?
Re: Random Numbers
Posted: Tue Jun 15, 2010 3:36 pm
by Eradani
good thing i don't make platz telling jokes