17.10.2013 - Adjusted for QNX, PIPeer release for Windows, Remote console

This commit is contained in:
peri4
2013-10-17 16:12:10 +04:00
parent 4b90f2818e
commit 0f1b528ac6
42 changed files with 585 additions and 171 deletions

View File

@@ -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;}