[Orxonox-commit 7123] r11740 - code/branches/Presentation_HS17_merge/src/modules/asteroidmining

landauf at orxonox.net landauf at orxonox.net
Mon Feb 12 00:20:18 CET 2018


Author: landauf
Date: 2018-02-12 00:20:18 +0100 (Mon, 12 Feb 2018)
New Revision: 11740

Modified:
   code/branches/Presentation_HS17_merge/src/modules/asteroidmining/SpicedAsteroidBelt.cc
Log:
[AsteroidMining_HS17] use existing definitions of pi and abs

Modified: code/branches/Presentation_HS17_merge/src/modules/asteroidmining/SpicedAsteroidBelt.cc
===================================================================
--- code/branches/Presentation_HS17_merge/src/modules/asteroidmining/SpicedAsteroidBelt.cc	2018-02-11 23:17:34 UTC (rev 11739)
+++ code/branches/Presentation_HS17_merge/src/modules/asteroidmining/SpicedAsteroidBelt.cc	2018-02-11 23:20:18 UTC (rev 11740)
@@ -85,8 +85,8 @@
 
     void SpicedAsteroidBelt::create(){
 
-        float myPi = 3.1415927410125732421875; //pi; // Math.pi ist statisch oder so. 
-        float width = this->radius1 - this->radius0; if(width<0){width = -width;} // predefined abs?
+        float myPi = math::pi;
+        float width = fabs(this->radius1 - this->radius0);
         float radius = (this->radius1 + this->radius0) / 2.0f;
         int segmentCount = (int)roundf(this->count / this->segments);
 



More information about the Orxonox-commit mailing list