Quantcast
Channel: bugs, errors - openFrameworks
Viewing all articles
Browse latest Browse all 636

OF 0.12.0 ofSetRandomSeed does not set random seed for ofRandom

$
0
0

Hi, I just noticed that in OF 0.12 (the current downloadable release) ofSetRandomSeed does not have any effect on ofRandom. That is because rand() is used in ofRandom and ofSetRandomSeed uses of::random and the std random number generator. I just checked GitHub and this seems to be fixed on the master branch (ofRandom uses of::random).

Since I have not seen this issue raised, one workaround to this is to simply set the seed with srand(seed) when using ofRandom.

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 636

Trending Articles