6 #define CLIP(x, y, z) ((x) < (y) ? (y) : ((x) > (z) ? (z) : (x)))
7 #define RECLIP(x, y, z) ((x) = ((x) < (y) ? (y) : ((x) > (z) ? (z) : (x))))
8 #define CLAMP(x, y, z) ((x) = ((x) < (y) ? (y) : ((x) > (z) ? (z) : (x))))
9 #define MAX(x, y) ((x) > (y) ? (x) : (y))
10 #define MIN(x, y) ((x) < (y) ? (x) : (y))
11 #define EQUIV(x, y) (fabs((x) - (y)) < 0.001)
12 #define DISTANCE(x1, y1, x2, y2) \
13 (sqrt(((x2) - (x1)) * ((x2) - (x1)) + ((y2) - (y1)) * ((y2) - (y1))))
20 // c-file-style: "linux"