00001
00020 #ifndef VECFUNCS_H
00021 #define VECFUNCS_H
00022
00023 #include "tessclas.h"
00024 #include <math.h>
00025
00026
00027
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
00058
00059 int direction(EDGEPT *point);
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074 #endif