17.10.2013 - Adjusted for QNX, PIPeer release for Windows, Remote console
This commit is contained in:
33
pimath.h
33
pimath.h
@@ -1,3 +1,6 @@
|
||||
/*! \file pimath.h
|
||||
* \brief Many mathematical functions and classes
|
||||
*/
|
||||
/*
|
||||
PIP - Platform Independent Primitives
|
||||
Math
|
||||
@@ -27,6 +30,12 @@
|
||||
#else
|
||||
# include <complex.h>
|
||||
# include <math.h>
|
||||
# undef PIP_MATH_J0
|
||||
# undef PIP_MATH_J1
|
||||
# undef PIP_MATH_JN
|
||||
# undef PIP_MATH_Y0
|
||||
# undef PIP_MATH_Y1
|
||||
# undef PIP_MATH_YN
|
||||
#endif
|
||||
|
||||
#ifndef M_LN2
|
||||
@@ -110,24 +119,12 @@ inline complexd log2(const complexd & c) {return log(c) / M_LN2;}
|
||||
inline complexd log10(const complexd & c) {return log(c) / M_LN10;}
|
||||
# endif
|
||||
#endif
|
||||
#ifndef PIP_MATH_J0
|
||||
__attribute__ ((unused)) static double j0(const double & v);
|
||||
#endif
|
||||
#ifndef PIP_MATH_J1
|
||||
__attribute__ ((unused)) static double j1(const double & v);
|
||||
#endif
|
||||
#ifndef PIP_MATH_JN
|
||||
__attribute__ ((unused)) static double jn(const int & n, const double & v);
|
||||
#endif
|
||||
#ifndef PIP_MATH_Y0
|
||||
__attribute__ ((unused)) static double y0(const double & v);
|
||||
#endif
|
||||
#ifndef PIP_MATH_Y1
|
||||
__attribute__ ((unused)) static double y1(const double & v);
|
||||
#endif
|
||||
#ifndef PIP_MATH_YN
|
||||
__attribute__ ((unused)) static double yn(const int & n, const double & v);
|
||||
#endif
|
||||
double piJ0(const double & v);
|
||||
double piJ1(const double & v);
|
||||
double piJn(int n, const double & v);
|
||||
double piY0(const double & v);
|
||||
double piY1(const double & v);
|
||||
double piYn(int n, const double & v);
|
||||
inline double toDb(double val) {return 10. * log10(val);}
|
||||
inline double fromDb(double val) {return pow(10., val / 10.);}
|
||||
inline double toRad(double deg) {return deg * M_PI_180;}
|
||||
|
||||
Reference in New Issue
Block a user