Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 11740


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

[AsteroidMining_HS17] use existing definitions of pi and abs

File:
1 edited

Legend:

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

    r11739 r11740  
    8686    void SpicedAsteroidBelt::create(){
    8787
    88         float myPi = 3.1415927410125732421875; //pi; // Math.pi ist statisch oder so.
    89         float width = this->radius1 - this->radius0; if(width<0){width = -width;} // predefined abs?
     88        float myPi = math::pi;
     89        float width = fabs(this->radius1 - this->radius0);
    9090        float radius = (this->radius1 + this->radius0) / 2.0f;
    9191        int segmentCount = (int)roundf(this->count / this->segments);
Note: See TracChangeset for help on using the changeset viewer.