00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifdef __cplusplus
00018 extern "C" {
00019 #endif
00020
00021
00022
00023 #ifndef GEOMETRY_H
00024 #define GEOMETRY_H
00025
00026 typedef struct Point {
00027 double x, y;
00028 } Point;
00029
00030 extern Point origin;
00031
00032 extern double xmin, xmax, ymin, ymax;
00033 extern double deltax, deltay;
00034
00035 extern int nsites;
00036 extern int sqrt_nsites;
00037
00038 extern void geominit(void);
00039 extern double dist_2(Point *, Point *);
00040 extern void subPt(Point * a, Point b, Point c);
00041 extern void addPt(Point * a, Point b, Point c);
00042 extern double area_2(Point a, Point b, Point c);
00043 extern int leftOf(Point a, Point b, Point c);
00044 extern int intersection(Point a, Point b, Point c, Point d, Point * p);
00045
00046 #endif
00047
00048
00049 #ifdef __cplusplus
00050 }
00051 #endif