Skip to content
Snippets Groups Projects
Commit 0ccb4258 authored by Stephen Smith's avatar Stephen Smith
Browse files

fixed inline sign
parent 5bd8ab35
No related branches found
No related tags found
No related merge requests found
...@@ -71,8 +71,7 @@ namespace MISCMATHS { ...@@ -71,8 +71,7 @@ namespace MISCMATHS {
int round(double x); int round(double x);
template<class T> template<class T>
inline int sign(T x){ if(x!=0) return int(x / abs(x)); inline int sign(T x){ if (x>0) return 1; else { if (x<0) return -1; else return 0; } }
else return 1; }
inline double pow(double x, float y) { return std::pow(x,(double) y); } inline double pow(double x, float y) { return std::pow(x,(double) y); }
inline double pow(float x, double y) { return std::pow((double) x,y); } inline double pow(float x, double y) { return std::pow((double) x,y); }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment