X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fguicast%2Fclip.h;h=d9b64fa1694c6d9fc3e6e98935d547705e7fa1f1;hb=1f78d86b5532943b2a3ea51f409a1fe5bd961e02;hp=ad31c072043b9975257674e5e0d239e61f70bd8a;hpb=30bdb85eb33a8ee7ba675038a86c6be59c43d7bd;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/guicast/clip.h b/cinelerra-5.1/guicast/clip.h index ad31c072..d9b64fa1 100644 --- a/cinelerra-5.1/guicast/clip.h +++ b/cinelerra-5.1/guicast/clip.h @@ -23,14 +23,21 @@ #define CLIP_H // Math macros - +#undef SQR #define SQR(x) ((x) * (x)) +#undef CLIP #define CLIP(x, y, z) ((x) < (y) ? (y) : ((x) > (z) ? (z) : (x))) +#undef RECLIP #define RECLIP(x, y, z) ((x) = ((x) < (y) ? (y) : ((x) > (z) ? (z) : (x)))) +#undef CLAMP #define CLAMP(x, y, z) ((x) = ((x) < (y) ? (y) : ((x) > (z) ? (z) : (x)))) +#undef MAX #define MAX(x, y) ((x) > (y) ? (x) : (y)) +#undef MIN #define MIN(x, y) ((x) < (y) ? (x) : (y)) +#undef EQUIV #define EQUIV(x, y) (fabs((x) - (y)) < 0.001) +#undef DISTANCE #define DISTANCE(x1, y1, x2, y2) \ (sqrt(((x2) - (x1)) * ((x2) - (x1)) + ((y2) - (y1)) * ((y2) - (y1))))