Changeset 11739 for code/branches/Presentation_HS17_merge/src/modules/asteroidmining/SpicedAsteroidField.cc
- Timestamp:
- Feb 12, 2018, 12:17:34 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/Presentation_HS17_merge/src/modules/asteroidmining/SpicedAsteroidField.cc
r11736 r11739 77 77 void SpicedAsteroidField::create(){ 78 78 79 int size;80 int pX;81 int pY;82 int pZ;79 float size; 80 float pX; 81 float pY; 82 float pZ; 83 83 84 84 for(int gertrud = 0; gertrud<count; ++gertrud){ … … 86 86 AsteroidMinable* a = new AsteroidMinable(this->getContext()); 87 87 88 size = round (rnd()*(this->maxSize - this->minSize)) + this->minSize;88 size = roundf(rnd(this->maxSize - this->minSize)) + this->minSize; 89 89 a->setSize(size); 90 90 91 pX = round (rnd()*2*this->radius) - radius;92 pY = round (rnd()*2*this->radius) - radius;93 pZ = round (rnd()*2*this->radius) - radius;91 pX = roundf(rnd(2*this->radius)) - radius; 92 pY = roundf(rnd(2*this->radius)) - radius; 93 pZ = roundf(rnd(2*this->radius)) - radius; 94 94 Vector3 relPos(pX, pY, pZ); 95 95 a->setPosition(this->position + relPos);
Note: See TracChangeset
for help on using the changeset viewer.