Graphviz 13.0.0~dev.20241220.2304
Loading...
Searching...
No Matches
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.

Macros

#define MIN(a, b)   ((a)<(b)?(a):(b))
 
#define MAX(a, b)   ((a)>(b)?(a):(b))
 
#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))
 

Macro Definition Documentation

◆ BETWEEN

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

Definition at line 38 of file arith.h.

◆ DEGREES

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

Definition at line 50 of file arith.h.

◆ M_PI

#define M_PI   3.14159265358979323846

Definition at line 41 of file arith.h.

◆ MAX

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

Definition at line 33 of file arith.h.

◆ MIN

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

Definition at line 28 of file arith.h.

◆ RADIANS

#define RADIANS (   deg)    ((deg)/180.0 * M_PI)

Definition at line 49 of file arith.h.

◆ ROUND

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

Definition at line 48 of file arith.h.

◆ SQR

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

Definition at line 52 of file arith.h.

◆ SQRT2

#define SQRT2   1.41421356237309504880

Definition at line 45 of file arith.h.