Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 12, 2018, 12:17:34 AM (7 years ago)
Author:
landauf
Message:

[AsteroidMining_HS17] fixed a bunch of compiler warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/Presentation_HS17_merge/src/modules/asteroidmining/SpicedAsteroidField.cc

    r11736 r11739  
    7777    void SpicedAsteroidField::create(){
    7878
    79         int size;
    80         int pX;
    81         int pY;
    82         int pZ;
     79        float size;
     80        float pX;
     81        float pY;
     82        float pZ;
    8383
    8484        for(int gertrud = 0; gertrud<count; ++gertrud){
     
    8686            AsteroidMinable* a = new AsteroidMinable(this->getContext());
    8787
    88             size = round(rnd()*(this->maxSize - this->minSize)) + this->minSize;
     88            size = roundf(rnd(this->maxSize - this->minSize)) + this->minSize;
    8989            a->setSize(size);
    9090
    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;
    9494            Vector3 relPos(pX, pY, pZ);
    9595            a->setPosition(this->position + relPos);
Note: See TracChangeset for help on using the changeset viewer.