Welcome to %s forums

BrainModular Users Forum

Login Register

where to put the random seed ?

Create your own modules in C++
Post Reply
User avatar
oli_lab
Member
Posts: 1266
Location: Brittany, France
Contact:

Unread post by oli_lab » 12 May 2015, 02:01

where to put the random seed ?

I put it like that...it is working but is it good practice ?

void wander::onGetParamInfo(int ParamIndex, TParamInfo* pParamInfo)
/* initialize random seed: */
srand(time(NULL));


thanx

* a wander behaviour on the way....
http://oli-lab.org

Win11 Ryzen9/32GB RAM - RME MADIFACE - SSL alpha link 4-16 - OSC capable interfaces

follow OLI_LAB adventures on Mastodon
@olivar_premier@mastodon.social

User avatar
senso
Site Admin
Posts: 4425
Location: France
Contact:

Unread post by senso » 13 May 2015, 18:34

in OnInitModule is probably the best place?

User avatar
oli_lab
Member
Posts: 1266
Location: Brittany, France
Contact:

Unread post by oli_lab » 15 May 2015, 17:53

yes it is, thanx:)
http://oli-lab.org

Win11 Ryzen9/32GB RAM - RME MADIFACE - SSL alpha link 4-16 - OSC capable interfaces

follow OLI_LAB adventures on Mastodon
@olivar_premier@mastodon.social

Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests