wxChart.cxx File Reference

#include "wxChart.h"
#include <math.h>
Include dependency graph for wxChart.cxx:

Go to the source code of this file.

Functions

static double st_difference (double val, int multi, bool sens=true)
static double st_decalage (double IncX, double MinX)
static double st_origine (double IncX, double MinX)
static void st_Inverse (double *l_MinCol, double *l_MaxCol)

Function Documentation

static double st_decalage ( double  IncX,
double  MinX 
) [static]

Definition at line 141 of file wxChart.cxx.

00142 {
00143   double retour = 0.00;
00144   div_t result;
00145 
00146   if (IncX >= 1) {
00147     result = div((int)MinX, (int)IncX);
00148     if ( result.rem == 0 ) {
00149       if (MinX - (int)MinX > 0 )
00150         retour = ((result.quot + 1) * IncX) - MinX;
00151     }
00152     else {
00153       retour = ((result.quot+1) * IncX) - MinX;
00154     }
00155   }
00156   return retour;
00157 }

static double st_difference ( double  val,
int  multi,
bool  sens = true 
) [static]

Definition at line 117 of file wxChart.cxx.

00118 {
00119   double retour=0;
00120   div_t result;
00121   result = div(int(val), multi);
00122 
00123   // multiple sup
00124   if ( sens ) {
00125     if ( val > 1) {
00126       if ( result.rem == 0 ) {
00127         if (val - (int)val > 0 )
00128           retour =  (multi - result.rem) - (val - int(val));
00129       }
00130       else {
00131         retour =  (multi - result.rem) - (val - int(val));
00132       }
00133     }
00134   }
00135   // multiple inf
00136   else
00137     retour = result.rem + (val - (int)val);
00138   return retour;
00139 }

static void st_Inverse ( double *  l_MinCol,
double *  l_MaxCol 
) [static]

Definition at line 178 of file wxChart.cxx.

00179 {
00180   if  (*l_MinCol > *l_MaxCol) {
00181     int tempo = (int)(*l_MaxCol);
00182     *l_MaxCol = *l_MinCol;
00183     *l_MinCol = tempo;
00184   }
00185 }

static double st_origine ( double  IncX,
double  MinX 
) [static]

Definition at line 159 of file wxChart.cxx.

00160 {
00161   double retour = MinX;
00162   div_t result;
00163 
00164   if (IncX >=1) {
00165     result = div((int)MinX, (int)IncX);
00166     if (result.rem == 0) {
00167       if (MinX - (int)MinX > 0 )
00168         retour = (result.quot + 1) * IncX;
00169     }
00170     else {
00171       retour = (result.quot + 1) * IncX;
00172     }
00173   }
00174   return retour;
00175 }


Generated on 18 Mar 2010 for creaMaracasVisu_lib by  doxygen 1.6.1