#ifndef _MATH #define _MATH #include #define PI 3.14159265358979323846 inline float sincf(const float x) {return (x==0)?1:sinf(x)/x;} #define roundf(x) floorf((x)+0.5f) #ifndef min #define min(x,y) ((xy)?x:y) #endif inline float intAdjustf(const float x,const float diff=0.01f) { register float f=roundf(x); return (fabsf(f-x)>1); return vr*(1.5f-vh*vr*vr); } inline unsigned int getClosestPowerOfTwo(const unsigned int x) { register unsigned int i=1; while (i>=1; return i; } inline unsigned int getUpperPowerOfTwo(const unsigned int x) { register unsigned int i=1; while (i>1; } inline int round(float x) { return (int)(x>0?x+0.5:x-0.5); } #endif