Skip to content

Commit 4cf2356

Browse files
authored
update ofRandomSeed in examples and tests (openframeworks#7622)
#changelog #math
1 parent 81d915a commit 4cf2356

File tree

4 files changed

+1
-6
lines changed

4 files changed

+1
-6
lines changed

Diff for: examples/3d/advanced3dExample/src/Swarm.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ void swarm::init(int nParticles, float positionDispersion, float velocityDispers
1717
particles.clear();
1818
}
1919

20-
ofSeedRandom();
21-
//
2220
glm::vec3 position, velocity;
2321
ofColor color;
2422
for(int i = 0; i < nParticles; i++){

Diff for: examples/android/androidAdvanced3DExample/src/Swarm.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,6 @@ void Swarm::init(int _nParticles, float positionDispersion, float velocityDisper
5656
// INITIALISE VALUES
5757
///////////////////////////////////////////
5858
//
59-
ofSeedRandom();
60-
//
6159
for (int i=0; i< nParticles; i++)
6260
{
6361
positions[i].x = (ofRandom(1.0f)-0.5f) * positionDispersion;

Diff for: examples/gl/billboardRotationExample/src/ofApp.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ void ofApp::update() {
5252

5353

5454
for (int i=0; i<NUM_BILLBOARDS; i++) {
55-
ofSeedRandom(i);
55+
ofSetRandomSeed(i);
5656
if(glm::distance(mouse,pos[i]) < ofRandom(100, 200)) {
5757
vel[i] -= mouseVec;
5858
}

Diff for: tests/addons/networkTcp/src/main.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,6 @@ class ofApp: public ofxUnitTestsApp{
257257
}
258258

259259
void run(){
260-
ofSeedRandom(ofGetSeconds());
261260
testNonBlocking();
262261
testBlocking();
263262
disconnectionAutoDetection();

0 commit comments

Comments
 (0)