00001 #ifndef __J2K__Math_HH__
00002 #define __J2K__Math_HH__
00003
00004 #define PI 3.1415926535897932D
00005 #define E 2.7182818284590451D
00006
00007 class Math
00008 {
00009 private:
00010 Math() { }
00011
00012
00013 double IEEEremainder(double d1, double d2) { return NULL; }
00014 double rint(double d) { }
00015
00016
00017 double random()
00018
00019 public:
00020
00021 inline double sin(double d) { return sin(d); }
00022 inline double cos(double d) { return cos(d); }
00023 inline double tan(double d) { return tan(d); }
00024 inline double asin(double d) { return asin(d); }
00025 inline double acos(double d) { return acos(d); }
00026 inline double atan(double d) { return atan(d); }
00027 inline double atan2(double d1, double d2) { return atan2(d1,d2); }
00028
00029 inline double exp(double d) { return exp(d); }
00030 inline double log(double d) { return log(d); }
00031 inline double sqrt(double d) { return sqrt(d); }
00032 inline double ceil(double d) { return ceil(d); }
00033 inline double floor(double d) { return floor(d); }
00034
00035 inline double pow(double d1, double d2) { return pow(d1,d2); }
00036
00037 inline int round(float f) { return (int)floor(f + 0.5F); }
00038 inline long round(double d) { return (long)floor(d + 0.5D); }
00039
00040 inline int abs(int i) { return ( i < 0 ? (-1 * i) : i ); }
00041 inline long abs(long l) { return ( l < 0L ? (-1 * l) : l ); }
00042 inline float abs(float f) { return ( f < 0.0F ? (-1 * f) : f ); }
00043 inline double abs(double d) { return ( d < 0.0D ? (-1 * d) : d ); }
00044
00045 inline int min(int i, int j) { return ( i <= j ? i : j ); }
00046 inline long min(long l, long j) { return ( l <= j ? l : j ); }
00047 inline float min(float f, float j) { return ( f <= j ? f : j ); }
00048 inline double min(double d, double j) { return ( d <= j ? d : j ); }
00049
00050 inline int max(int i, int j) { return ( i >= j ? i : j ); }
00051 inline long max(long l, long j) { return ( l >= j ? l : j ); }
00052 inline float max(float f, float j) { return ( f >= j ? f : j ); }
00053 inline double max(double d, double j) { return ( d >= j ? d : j ); }
00054 };
00055
00056 #endif