Random and datatypes

Started by selmiak, Mon 19/12/2011 23:04:18

Previous topic - Next topic

selmiak

I'm declaring an
int code = 0;
at the start of a room and later fill it with
code = 1000 + Random(998999);
but the highest random values I get from this is around the 32k for a short in AGS.

Can I trust AGS to only create random numbers below 32.767 ? Then I could just multiply the hell out of it (with random(30)). But if there ARE random values above 32.767 possible this could lead to unexpected and unpredictable results.
Out of 20 tries none were over 32.767(+1000). Are 20 tries enough or should I wake up Gauss and ask him?

Wyz

Well actually there is a limit, I read about it in a topic (click) not too long ago. I guess that will answer your question. :)
Life is like an adventure without the pixel hunts.

selmiak

thanks for the link this helped :)

SMF spam blocked by CleanTalk