00001 /* $Id: fors_point.h,v 1.4 2010/09/14 07:49:30 cizzo Exp $ 00002 * 00003 * This file is part of the FORS Library 00004 * Copyright (C) 2002-2010 European Southern Observatory 00005 * 00006 * This program is free software; you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation; either version 2 of the License, or 00009 * (at your option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program; if not, write to the Free Software 00018 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00019 */ 00020 00021 /* 00022 * $Author: cizzo $ 00023 * $Date: 2010/09/14 07:49:30 $ 00024 * $Revision: 1.4 $ 00025 * $Name: fors-4_8_6 $ 00026 */ 00027 00028 #ifndef FORS_POINT_H 00029 #define FORS_POINT_H 00030 00031 #include <cpl.h> 00032 00033 CPL_BEGIN_DECLS 00034 00035 typedef struct _fors_point 00036 { 00037 double x, y; 00038 00039 } fors_point; 00040 00041 #undef LIST_ELEM 00042 #define LIST_ELEM fors_point 00043 #include <list.h> 00044 00045 fors_point *fors_point_new(double x, double y); 00046 fors_point *fors_point_duplicate(const fors_point *p); 00047 void fors_point_delete(fors_point **point); 00048 void fors_point_delete_list(fors_point ***point); 00049 void fors_point_print(const fors_point *s); 00050 bool fors_point_equal(const fors_point *p, 00051 const fors_point *q); 00052 00053 double fors_point_distsq(const fors_point *p, 00054 const fors_point *q); 00055 00056 00057 CPL_END_DECLS 00058 00059 #endif