Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 2, 2005, 10:46:36 PM (19 years ago)
Author:
bensch
Message:

orxonox/branches/particleEngine: no more random()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/particleEngine/src/lib/graphics/particles/particle_system.cc

    r4001 r4016  
    277277        }
    278278     
    279       particles->timeToLive = this->lifeSpan + (float)(random()/RAND_MAX)* this->randomLifeSpan;
     279      particles->timeToLive = this->lifeSpan + (float)(rand()/RAND_MAX)* this->randomLifeSpan;
    280280      particles->position = position;
    281281      particles->velocity = velocity;
    282282
    283283      //  particle->rotation = ; //! \todo rotation is once again something to be done.
    284       particles->mass = this->initialMass + (random()/RAND_MAX -.5)* this->randomInitialMass;
    285       particles->radius = this->startRadius + (random()/RAND_MAX-.5)*this->randomStartRadius;
     284      particles->mass = this->initialMass + (rand()/RAND_MAX -.5)* this->randomInitialMass;
     285      particles->radius = this->startRadius + (rand()/RAND_MAX-.5)*this->randomStartRadius;
    286286     
    287       particles->radiusIt = (this->endRadius + (random()/RAND_MAX-.5)*this->randomEndRadius - particles->radius) / particles->timeToLive;
     287      particles->radiusIt = (this->endRadius + (rand()/RAND_MAX-.5)*this->randomEndRadius - particles->radius) / particles->timeToLive;
    288288
    289289      ++this->count;
Note: See TracChangeset for help on using the changeset viewer.