Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update ofRandomSeed in examples and tests #7622

Merged
merged 5 commits into from
Aug 30, 2023

Conversation

artificiel
Copy link
Contributor

No description provided.

@artificiel artificiel mentioned this pull request Aug 30, 2023
77 tasks
@@ -17,7 +17,8 @@ void swarm::init(int nParticles, float positionDispersion, float velocityDispers
particles.clear();
}

ofSeedRandom();
// ofSeedRandom(); superfluous -- the current random engine state
// is indistinguishable from another arbirarilty-seeded state
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree. Feel free to remove. No need for commenting out :)

@@ -56,7 +56,8 @@ void Swarm::init(int _nParticles, float positionDispersion, float velocityDisper
// INITIALISE VALUES
///////////////////////////////////////////
//
ofSeedRandom();
// ofSeedRandom(); superfluous -- the current random engine state
// is indistinguishable from another arbirarilty-seeded state
//
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree. Feel free to remove. No need for commenting out :)

@@ -257,7 +257,7 @@ class ofApp: public ofxUnitTestsApp{
}

void run(){
ofSeedRandom(ofGetSeconds());
ofSetRandomSeed(ofGetSeconds()); // why? random engine is initialized to a non-deterministic state
Copy link
Member

@ofTheo ofTheo Aug 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree. Feel free to remove.

@artificiel
Copy link
Contributor Author

done!

@ofTheo ofTheo merged commit 4cf2356 into openframeworks:master Aug 30, 2023
9 checks passed
@ofTheo
Copy link
Member

ofTheo commented Aug 30, 2023

Thanks!! :)

@artificiel artificiel deleted the seedRandom-clean branch August 30, 2023 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants