#include "wx/wxprec.h"
#include "wx/wx.h"
#include "chart.h"
#include <math.h>
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_InverseCol (double *l_MinCol, double *l_MaxCol) |
static double st_decalage | ( | double | IncX, | |
double | MinX | |||
) | [static] |
Definition at line 152 of file chart.cpp.
Referenced by wxChart::DrawAxe(), and wxChart::DrawGrille().
00153 { 00154 double retour = 0.00; 00155 div_t result; 00156 00157 if (IncX >= 1) 00158 { 00159 result = div(MinX, IncX); 00160 if ( result.rem == 0 ) 00161 { 00162 if (MinX - (int)MinX > 0 ) 00163 retour = ((result.quot + 1) * IncX) - MinX; 00164 } 00165 else 00166 { 00167 retour = ((result.quot+1) * IncX) - MinX; 00168 } 00169 } 00170 return retour; 00171 }
static double st_difference | ( | double | val, | |
int | multi, | |||
bool | sens = true | |||
) | [static] |
Definition at line 123 of file chart.cpp.
Referenced by wxChart::Draw().
00124 { 00125 double retour=0; 00126 div_t result; 00127 00128 result = div(int(val), multi); 00129 // multiple sup 00130 if ( sens ) 00131 { 00132 if ( val > 1) 00133 { 00134 if ( result.rem == 0 ) 00135 { 00136 if (val - (int)val > 0 ) 00137 retour = (multi - result.rem) - (val - int(val)); 00138 } 00139 else 00140 { 00141 retour = (multi - result.rem) - (val - int(val)); 00142 } 00143 } 00144 } 00145 // multiple inf 00146 else 00147 retour = result.rem + (val - (int)val); 00148 00149 return retour; 00150 }
static void st_InverseCol | ( | double * | l_MinCol, | |
double * | l_MaxCol | |||
) | [static] |
static double st_origine | ( | double | IncX, | |
double | MinX | |||
) | [static] |
Definition at line 174 of file chart.cpp.
Referenced by wxChart::DrawAxe().
00175 { 00176 double retour = MinX; 00177 div_t result; 00178 00179 if (IncX >=1) 00180 { 00181 result = div(MinX, IncX); 00182 if (result.rem == 0) 00183 { 00184 if (MinX - (int)MinX > 0 ) 00185 retour = (result.quot + 1) * IncX; 00186 } 00187 else 00188 { 00189 retour = (result.quot + 1) * IncX; 00190 } 00191 } 00192 return retour; 00193 }