Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
0 registered members (), 18,008 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 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,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,024
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