ccstruct/vecfuncs.h

Go to the documentation of this file.
00001 
00020 #ifndef VECFUNCS_H
00021 #define VECFUNCS_H
00022 
00023 #include "tessclas.h"
00024 #include <math.h>
00025 
00026 /*----------------------------------------------------------------------
00027               M a c r o s
00028 ----------------------------------------------------------------------*/
00033 #define point_diff(p,p1,p2)  \
00034 ((p).x = (p1).x - (p2).x,        \
00035    (p).y = (p1).y - (p2).y,        \
00036    (p))
00037 
00041 #define CROSS(a,b) \
00042 ((a).x * (b).y - (a).y * (b).x)
00043 
00047 #define SCALAR(a,b) \
00048 ((a).x * (b).x + (a).y * (b).y)
00049 
00053 #define LENGTH(a) \
00054 ((a).x * (a).x + (a).y * (a).y)
00055 
00056 /*----------------------------------------------------------------------
00057               F u n c t i o n s
00058 ----------------------------------------------------------------------*/
00059 int direction(EDGEPT *point); 
00060 
00061 /*
00062 #if defined(__STDC__) || defined(__cplusplus) || MAC_OR_DOS
00063 # define _ARGS(s) s
00064 #else
00065 # define _ARGS(s) ()
00066 #endif*/
00067 
00068 /* vecfuncs.c
00069 int direction
00070   _ARGS((EDGEPT *point));
00071 
00072 #undef _ARGS
00073 */
00074 #endif

Generated on Wed Feb 28 19:49:08 2007 for Tesseract by  doxygen 1.5.1