SpherePackingScenarioGenerator
|
00001 /* 00002 * CalculationBasics.h 00003 * 00004 * Created on: Mar 12, 2012 00005 * Author: michael 00006 */ 00007 00008 #ifndef CALCULATIONBASICS_H_ 00009 #define CALCULATIONBASICS_H_ 00010 00011 #include <cmath> 00012 00013 // todo replace this by static functions or try the signal word inline for pure functions 00014 00015 namespace algorithms { 00016 00017 class CalculationBasics { 00018 public: 00019 static double toRadiant(const double& valueInDegree) { 00020 return valueInDegree/180*M_PI; 00021 } 00022 00023 static double toDegree(const double& valueInRadiant) { 00024 return valueInRadiant/M_PI*180; 00025 } 00026 }; 00027 00028 } /* namespace algorithms */ 00029 #endif /* CALCULATIONBASICS_H_ */