00001
00002 #ifndef utils_h
00003 #define utils_h
00004
00005
00006
00007 #define min_value(a,b) ( ((a)<(b)) ? (a) : (b) )
00008 #define max_value(a,b) ( ((a)>(b)) ? (a) : (b) )
00009
00010
00011
00016 class SXYUtil {
00017 private:
00018 static void assertValues(double &min, double &max);
00019
00020 public:
00021
00022 static int calcPrecision(double min, double max);
00023 static void calcZoomOut(double &min, double &max);
00024 static void calcMinMax(double &xmin, double &xmax,
00025 double &ymin, double &ymax);
00026
00027 static double makeInterpolation( double x1, double y1,
00028 double x2, double y2, double x );
00029
00030 static int intersectPoints( int is_log_x, int is_log_y,
00031 double ax1, double ay1, double ax2, double ay2,
00032 double bx1, double by1, double bx2, double by2,
00033 double& ix, double& iy );
00034 };
00035
00036
00037
00038 #endif
00039