00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef FORS_POINT_H
00029 #define FORS_POINT_H
00030
00031 #include <cpl.h>
00032
00033 #include <stdbool.h>
00034
00035 CPL_BEGIN_DECLS
00036
00037 typedef struct _fors_point
00038 {
00039 double x, y;
00040
00041 } fors_point;
00042
00043 #undef LIST_ELEM
00044 #define LIST_ELEM fors_point
00045 #include <list.h>
00046
00047 fors_point *fors_point_new(double x, double y);
00048 fors_point *fors_point_duplicate(const fors_point *p);
00049 void fors_point_delete(fors_point **point);
00050 void fors_point_delete_list(fors_point ***point);
00051 void fors_point_print(const fors_point *s);
00052 bool fors_point_equal(const fors_point *p,
00053 const fors_point *q);
00054
00055 double fors_point_distsq(const fors_point *p,
00056 const fors_point *q);
00057
00058
00059 CPL_END_DECLS
00060
00061 #endif