src/tool/math_tools.cpp File Reference

#include "../tool/math_tools.h"
#include <math.h>

Include dependency graph for math_tools.cpp:

Go to the source code of this file.

Functions

double Deg2Rad (int degre)
int Rad2Deg (double rad)
template<class T>
BorneTpl (const T &valeur, const T &min, const T &max)
long BorneLong (const long &valeur, const long &min, const long &max)
double BorneDouble (const double &valeur, const double &min, const double &max)
double InverseAngle (const double &angle)
double InverseAngleRad (const double &angle)
double InverseAngleDeg (const double &angle)
double AbsReel (const double x)
bool EgalZero (const double x)

Variables

const double EPS_ZERO = 0.05


Function Documentation

double AbsReel ( const double  x  ) 

Definition at line 80 of file math_tools.cpp.

00080                                {
00081         return fabs(x);
00082 }

Here is the caller graph for this function:

double BorneDouble ( const double &  valeur,
const double &  min,
const double &  max 
)

Definition at line 52 of file math_tools.cpp.

00052                                                                                {
00053         return BorneTpl (valeur, min, max);
00054 }

Here is the call graph for this function:

Here is the caller graph for this function:

long BorneLong ( const long &  valeur,
const long &  min,
const long &  max 
)

Definition at line 48 of file math_tools.cpp.

00048                                                                      {
00049         return BorneTpl (valeur, min, max);
00050 }

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T>
T BorneTpl ( const T &  valeur,
const T &  min,
const T &  max 
)

Definition at line 39 of file math_tools.cpp.

00039                                                         {
00040   if (valeur < min)
00041     return min;
00042   else if (max < valeur)
00043     return max;
00044   else
00045     return valeur;
00046 }

Here is the caller graph for this function:

double Deg2Rad ( int  degre  ) 

Definition at line 29 of file math_tools.cpp.

00029                           {
00030   return ((double)degre)*M_PI/180;
00031 }

bool EgalZero ( const double  x  ) 

Definition at line 84 of file math_tools.cpp.

00084                               {
00085         return AbsReel(x) <= EPS_ZERO;
00086 }

Here is the call graph for this function:

Here is the caller graph for this function:

double InverseAngle ( const double &  angle  ) 

Definition at line 57 of file math_tools.cpp.

00057                                          {
00058   if (angle < 0)
00059     return -M_PI - angle;
00060   else
00061     return M_PI - angle;
00062 }

Here is the caller graph for this function:

double InverseAngleDeg ( const double &  angle  ) 

Definition at line 73 of file math_tools.cpp.

00073                                             {
00074   if (angle < 0)
00075     return -180 - angle;
00076   else
00077     return 180 - angle;
00078 }

double InverseAngleRad ( const double &  angle  ) 

Definition at line 65 of file math_tools.cpp.

00065                                             {
00066   if (angle < 0)
00067     return -M_PI - angle;
00068   else
00069     return M_PI - angle;
00070 }

Here is the caller graph for this function:

int Rad2Deg ( double  rad  ) 

Definition at line 33 of file math_tools.cpp.

00033                         {
00034   return int(rad*180/M_PI);
00035 }


Variable Documentation

const double EPS_ZERO = 0.05

Definition at line 26 of file math_tools.cpp.


Generated on Mon Jan 1 13:26:27 2007 for Wormux by  doxygen 1.4.7