Gamestudio Links
Zorro Links
Newest Posts
bar time, right side open or close?
by qin. 01/02/26 02:15
long time to load data
by qin. 12/31/25 09:57
The new evaluation shell
by jcl. 12/29/25 09:56
about Zorro S (monthly)
by AndrewAMD. 12/29/25 03:24
Xor Memory Problem.
by TipmyPip. 12/26/25 19:14
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (SBGuy), 2,966 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Syndrela, HDRSEO, AOUNZA, digitalboy381, agasior
19190 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
random/integer #292544
10/04/09 16:43
10/04/09 16:43
Joined: May 2006
Posts: 50
austria
R
roald Offline OP
Junior Member
roald  Offline OP
Junior Member
R

Joined: May 2006
Posts: 50
austria
hi...

well, can you tell me which algorithm GS uses to create random values (integer);

you know that random is NOT random (higher values are generated more than lower values)

thx
roald

Re: random/integer [Re: roald] #292607
10/05/09 08:54
10/05/09 08:54
Joined: Jul 2000
Posts: 28,044
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,044
Frankfurt
Software programs are deterministic, thus you're right that nothing is random unless you plug in a hardware random generator. But of course there are no "higher values generated more than lower values". The distribution is pretty even. For details about the algorithm you could probably get information on the Microsoft VC++ forum. The random functions are part of the standard C library.


Re: random/integer [Re: jcl] #292611
10/05/09 09:59
10/05/09 09:59
Joined: May 2006
Posts: 50
austria
R
roald Offline OP
Junior Member
roald  Offline OP
Junior Member
R

Joined: May 2006
Posts: 50
austria
thx for your fast reply...

well, generating 100 000 values (range 1 -100) 50 times i HAVE a divergence at higher values...

but, as you recommended, i will read the microsoft VC++ docs...

thx again
dietmar



Last edited by roald; 10/05/09 10:01.

Moderated by  old_bill, Tobias 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1