pistring::toFloat/Double/LDouble precise fixes
This commit is contained in:
@@ -101,7 +101,12 @@ const double rad2deg = M_180_PI;
|
||||
inline int sign(const float & x) {return (x < 0.f) ? -1 : (x > 0.f ? 1 : 0);}
|
||||
inline int sign(const double & x) {return (x < 0. ) ? -1 : (x > 0. ? 1 : 0);}
|
||||
inline int sign(const ldouble & x) {return (x < 0.L) ? -1 : (x > 0.L ? 1 : 0);}
|
||||
|
||||
inline int pow2(const int p) {return 1 << p;}
|
||||
inline float pow10(const int & e) {return powf(10.f, e);}
|
||||
inline double pow10(const double & e) {return pow(10., e);}
|
||||
inline ldouble pow10(const ldouble & e) {return powl(10.L, e);}
|
||||
|
||||
inline double sinc(const double & v) {if (v == 0.) return 1.; double t = M_PI * v; return sin(t) / t;}
|
||||
|
||||
PIP_EXPORT double piJ0(const double & v);
|
||||
|
||||
Reference in New Issue
Block a user