$search

macros.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define AISNAV_IS_POD(T)   (0)
#define CUB(x)   ((x)*(x)*(x))
#define DEG2RAD(x)   ((x) * 0.01745329251994329575)
#define ERASE_ARRAY(var, size)   memset(var, 0, size*sizeof(*var))
#define ERASE_STRUCT(var)   memset(&var, 0, sizeof(var))
#define GET_COLOR(i, size, r, g, b)
#define HYPOT(x, y)   (sqrt(SQR(x) + SQR(y)))
#define HYPOT_SQUARED(x, y)   (SQR(x) + SQR(y))
#define IS_EQUAL(f, g)   (fabs(f - g) < 1e-12)
#define IS_INT(a)   (fabs(ROUND(a)-(a))<PREC)
#define IS_ZERO(f)   (fabs(f) < 1e-12)
#define MAX(a, b)   ((a)>(b)?(a):(b))
#define MAX3(a, b, c)   MAX((a),MAX((b),(c)))
#define MAX4(a, b, c, d)   MAX((d),MAX3((a),(b),(c)))
#define MIN(a, b)   ((a)<(b)?(a):(b))
#define MIN3(a, b, c)   MIN((a),MIN((b),(c)))
#define MIN4(a, b, c, d)   MIN((d),MIN3((a),(b),(c)))
#define PREC   1e-12
#define RAD2DEG(x)   ((x) * 57.29577951308232087721)
#define ROUND(x)   ((x) < 0 ? (int)((x) - .5): (int) ((x) + .5))
#define SET_ARRAY(var, value, size)   {for (int i=0; i<(int)size; ++i) var[i]=value;}
#define SIGN(a)   ((a)>0?1:((a)<0?-1:0))
#define SQR(x)   ((x)*(x))
#define SQRT2   1.414213562373095145474621858738828450441
#define SQRT3   1.732050807568877293527446341505872366943

Define Documentation

#define AISNAV_IS_POD (  )     (0)

Definition at line 200 of file src/stuff/macros.h.

#define CUB (  )     ((x)*(x)*(x))

Definition at line 142 of file src/stuff/macros.h.

#define DEG2RAD (  )     ((x) * 0.01745329251994329575)

Definition at line 21 of file src/stuff/macros.h.

#define ERASE_ARRAY ( var,
size   )     memset(var, 0, size*sizeof(*var))

Definition at line 178 of file src/stuff/macros.h.

#define ERASE_STRUCT ( var   )     memset(&var, 0, sizeof(var))

Definition at line 174 of file src/stuff/macros.h.

#define GET_COLOR ( i,
size,
r,
g,
 ) 
Value:
((floor(i*6./(double)size) == 0) || (floor(i*6./(double)size) == 6) ? \
   (r=1,g=(i*6./size-floor(i*6./size)),b=0) : \
   ((floor(i*6./(double)size) == 1) ? (r=1.-(i*6./size-floor(i*6./size)),g=1,b=0) : \
    ((floor(i*6./(double)size) == 2) ? (r=0,g=1,b=(i*6./size-floor(i*6./size))) : \
     ((floor(i*6./(double)size) == 3) ? (r=0,g=1-(i*6./size-floor(i*6./size)), b=1) : \
      ((floor(i*6./(double)size) == 4) ? (r=(i*6./size-floor(i*6./size)),g=0, b=1) : \
       (r=1,g=0, b=1-(i*6./size-floor(i*6./size))))))))

Definition at line 99 of file src/stuff/macros.h.

#define HYPOT ( x,
 )     (sqrt(SQR(x) + SQR(y)))

Definition at line 146 of file src/stuff/macros.h.

#define HYPOT_SQUARED ( x,
 )     (SQR(x) + SQR(y))

Definition at line 150 of file src/stuff/macros.h.

#define IS_EQUAL ( f,
 )     (fabs(f - g) < 1e-12)

Definition at line 170 of file src/stuff/macros.h.

#define IS_INT (  )     (fabs(ROUND(a)-(a))<PREC)

Definition at line 158 of file src/stuff/macros.h.

#define IS_ZERO (  )     (fabs(f) < 1e-12)

Definition at line 166 of file src/stuff/macros.h.

#define MAX ( a,
 )     ((a)>(b)?(a):(b))

Definition at line 126 of file src/stuff/macros.h.

#define MAX3 ( a,
b,
 )     MAX((a),MAX((b),(c)))

Definition at line 130 of file src/stuff/macros.h.

#define MAX4 ( a,
b,
c,
 )     MAX((d),MAX3((a),(b),(c)))

Definition at line 134 of file src/stuff/macros.h.

#define MIN ( a,
 )     ((a)<(b)?(a):(b))

Definition at line 114 of file src/stuff/macros.h.

#define MIN3 ( a,
b,
 )     MIN((a),MIN((b),(c)))

Definition at line 118 of file src/stuff/macros.h.

#define MIN4 ( a,
b,
c,
 )     MIN((d),MIN3((a),(b),(c)))

Definition at line 122 of file src/stuff/macros.h.

#define PREC   1e-12

Definition at line 109 of file src/stuff/macros.h.

#define RAD2DEG (  )     ((x) * 57.29577951308232087721)

Definition at line 25 of file src/stuff/macros.h.

#define ROUND (  )     ((x) < 0 ? (int)((x) - .5): (int) ((x) + .5))

Definition at line 154 of file src/stuff/macros.h.

#define SET_ARRAY ( var,
value,
size   )     {for (int i=0; i<(int)size; ++i) var[i]=value;}

Definition at line 182 of file src/stuff/macros.h.

#define SIGN (  )     ((a)>0?1:((a)<0?-1:0))

Definition at line 162 of file src/stuff/macros.h.

#define SQR (  )     ((x)*(x))

Definition at line 138 of file src/stuff/macros.h.

#define SQRT2   1.414213562373095145474621858738828450441

Definition at line 110 of file src/stuff/macros.h.

#define SQRT3   1.732050807568877293527446341505872366943

Definition at line 111 of file src/stuff/macros.h.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines


hogman_minimal
Author(s): Maintained by Juergen Sturm
autogenerated on Tue Mar 5 12:00:14 2013