aboutsummaryrefslogtreecommitdiff
path: root/include/smmath.hpp
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2016-04-25 23:47:43 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2016-04-25 23:47:43 +0800
commitc2b99f6321965b2c5b30a1b72b29119281c2d7e1 (patch)
tree949b2a1ad1d522df5e02dea75f174bc546d869f2 /include/smmath.hpp
parent261bfb611a92c5dec13f65fb225a127a66a1b43b (diff)
downloadSMELT-c2b99f6321965b2c5b30a1b72b29119281c2d7e1.tar.xz
Compile with -fPIC to allow linkage to libraries.
Make several math functions static. Elimate several warnings from the compiler.
Diffstat (limited to 'include/smmath.hpp')
-rw-r--r--include/smmath.hpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/smmath.hpp b/include/smmath.hpp
index 5172772..b9763b7 100644
--- a/include/smmath.hpp
+++ b/include/smmath.hpp
@@ -23,10 +23,10 @@ template<class T>const T& max(const T& a,const T& b){return a>b?a:b;}
class smMath
{
public:
- double deg2rad(double deg){return deg/180.*PI;}
- double rad2deg(double rad){return rad/PI*180.;}
- double clamprad(double a){while(a<0)a+=2*PI;while(a>2*PI)a-=2*PI;return a;}
- double clampdeg(double a){while(a<0)a+=360.;while(a>360)a-=360.;return a;}
+ static double deg2rad(double deg){return deg/180.*PI;}
+ static double rad2deg(double rad){return rad/PI*180.;}
+ static double clamprad(double a){while(a<0)a+=2*PI;while(a>2*PI)a-=2*PI;return a;}
+ static double clampdeg(double a){while(a<0)a+=360.;while(a>360)a-=360.;return a;}
};
class smvec2d
{