00001 /* 00002 * This file is part of the ESO SINFONI Pipeline 00003 * Copyright (C) 2004,2005 European Southern Observatory 00004 * 00005 * This program is free software; you can redistribute it and/or modify 00006 * it under the terms of the GNU General Public License as published by 00007 * the Free Software Foundation; either version 2 of the License, or 00008 * (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program; if not, write to the Free Software 00017 * Foundation, 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA 00018 */ 00019 /*--------------------------------------------------------------------------- 00020 00021 File name : poly2d.c 00022 Author : N. Devillard 00023 Created on : 22 Jun 1999 00024 Description : 2D polynomial handling 00025 00026 *--------------------------------------------------------------------------*/ 00027 /* 00028 $Id: sinfo_poly2d.c,v 1.4 2012/03/03 09:50:08 amodigli Exp $ 00029 $Author: amodigli $ 00030 $Date: 2012/03/03 09:50:08 $ 00031 $Revision: 1.4 $ 00032 */ 00033 #ifdef HAVE_CONFIG_H 00034 # include <config.h> 00035 #endif 00036 /*--------------------------------------------------------------------------- 00037 Includes 00038 ---------------------------------------------------------------------------*/ 00039 #include "sinfo_poly2d.h" 00062 double 00063 sinfo_poly2d_compute( 00064 poly2d * p, 00065 double x, 00066 double y 00067 ) 00068 { 00069 double z ; 00070 int i ; 00071 00072 z = 0.00 ; 00073 00074 for (i=0 ; i<p->nc ; i++) { 00075 z += p->c[i] * sinfo_ipow(x, p->px[i]) * sinfo_ipow(y, p->py[i]) ; 00076 } 00077 return z ; 00078 }