Graphviz 2.29.20120208.0545
Defines
lib/common/arith.h File Reference
#include <limits.h>
#include <math.h>
Include dependency graph for arith.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define _GNU_SOURCE   1
#define MIN(a, b)   ((a)<(b)?(a):(b))
#define MAX(a, b)   ((a)>(b)?(a):(b))
#define ABS(a)   ((a) >= 0 ? (a) : -(a))
#define AVG(a, b)   ((a + b) / 2)
#define SGN(a)   (((a)<0)? -1 : 1)
#define CMP(a, b)   (((a)<(b)) ? -1 : (((a)>(b)) ? 1 : 0))
#define INT_MAX   ((int)(~(unsigned)0 >> 1))
#define INT_MIN   (-INT_MAX - 1)
#define MAXSHORT   (0x7fff)
#define MAXDOUBLE   1.7976931348623157e+308
#define MAXFLOAT   ((float)3.40282347e+38)
#define BETWEEN(a, b, c)   (((a) <= (b)) && ((b) <= (c)))
#define M_PI   3.14159265358979323846
#define SQRT2   1.41421356237309504880
#define ROUND(f)   ((f>=0)?(int)(f + .5):(int)(f - .5))
#define RADIANS(deg)   ((deg)/180.0 * M_PI)
#define DEGREES(rad)   ((rad)/M_PI * 180.0)
#define SQR(a)   ((a) * (a))
#define sincos(x, s, c)   *s = sin(x); *c = cos(x)

Define Documentation

#define _GNU_SOURCE   1

Definition at line 22 of file arith.h.

#define ABS (   a)    ((a) >= 0 ? (a) : -(a))

Definition at line 48 of file arith.h.

Referenced by bezier_clip(), fillLine(), spline_at_y(), and stress_majorization_kD_mkernel().

#define AVG (   a,
 
)    ((a + b) / 2)

Definition at line 50 of file arith.h.

#define BETWEEN (   a,
  b,
 
)    (((a) <= (b)) && ((b) <= (c)))

Definition at line 77 of file arith.h.

Referenced by spline_at_y().

#define CMP (   a,
 
)    (((a)<(b)) ? -1 : (((a)>(b)) ? 1 : 0))

Definition at line 52 of file arith.h.

#define DEGREES (   rad)    ((rad)/M_PI * 180.0)

Definition at line 89 of file arith.h.

#define INT_MAX   ((int)(~(unsigned)0 >> 1))

Definition at line 55 of file arith.h.

Referenced by bfs(), compute_bb(), dijkstra(), rank1(), and sizeArray().

#define INT_MIN   (-INT_MAX - 1)

Definition at line 59 of file arith.h.

#define M_PI   3.14159265358979323846

Definition at line 80 of file arith.h.

Referenced by attach_attrs_and_arrows(), endpath(), layout_block(), and makeObstacle().

#define MAX (   a,
 
)    ((a)>(b)?(a):(b))
#define MAXDOUBLE   1.7976931348623157e+308

Definition at line 67 of file arith.h.

Referenced by choose_node(), Plegal_arrangement(), stress_majorization_kD_mkernel(), and xdotBB().

#define MAXFLOAT   ((float)3.40282347e+38)

Definition at line 71 of file arith.h.

Referenced by dijkstra_f(), and stress_majorization_kD_mkernel().

#define MAXSHORT   (0x7fff)

Definition at line 63 of file arith.h.

Referenced by dot_scan_ranks().

#define MIN (   a,
 
)    ((a)<(b)?(a):(b))
#define RADIANS (   deg)    ((deg)/180.0 * M_PI)

Definition at line 88 of file arith.h.

Referenced by place_portlabel().

#define ROUND (   f)    ((f>=0)?(int)(f + .5):(int)(f - .5))
#define SGN (   a)    (((a)<0)? -1 : 1)

Definition at line 51 of file arith.h.

Referenced by fillLine().

#define sincos (   x,
  s,
 
)    *s = sin(x); *c = cos(x)

Definition at line 96 of file arith.h.

#define SQR (   a)    ((a) * (a))

Definition at line 91 of file arith.h.

#define SQRT2   1.41421356237309504880

Definition at line 84 of file arith.h.