Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008 #ifndef MATH_H_
00009 #define MATH_H_
00010 #include <math.h>
00011
00012 namespace rotateOp {
00013
00017 class MathHelper {
00018 public:
00019
00020 static const double PI = 3.14159265358979;
00021
00029 static double roundDecimal(const double number, const int decimals) {
00030 int intPart = number;
00031 double decimalPart = number - intPart;
00032 double numberDecimals = pow(10, decimals);
00033 double decimalRound = round(decimalPart * numberDecimals);
00034
00035 return static_cast<double> (intPart + (decimalRound / numberDecimals));
00036 }
00037
00038 };
00039 }
00040
00041 #endif