SINFONI Pipeline Reference Manual
2.6.0
sinfoni
sinfo_poly2d.c
1
/*
2
* This file is part of the ESO SINFONI Pipeline
3
* Copyright (C) 2004,2005 European Southern Observatory
4
*
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 2 of the License, or
8
* (at your option) any later version.
9
*
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA
18
*/
19
/*---------------------------------------------------------------------------
20
21
File name : poly2d.c
22
Author : N. Devillard
23
Created on : 22 Jun 1999
24
Description : 2D polynomial handling
25
26
*--------------------------------------------------------------------------*/
27
/*
28
$Id: sinfo_poly2d.c,v 1.4 2012-03-03 09:50:08 amodigli Exp $
29
$Author: amodigli $
30
$Date: 2012-03-03 09:50:08 $
31
$Revision: 1.4 $
32
*/
33
#ifdef HAVE_CONFIG_H
34
# include <config.h>
35
#endif
36
/*---------------------------------------------------------------------------
37
Includes
38
---------------------------------------------------------------------------*/
39
#include "sinfo_poly2d.h"
62
double
63
sinfo_poly2d_compute(
64
poly2d * p,
65
double
x,
66
double
y
67
)
68
{
69
double
z ;
70
int
i ;
71
72
z = 0.00 ;
73
74
for
(i=0 ; i<p->nc ; i++) {
75
z += p->c[i] * sinfo_ipow(x, p->px[i]) * sinfo_ipow(y, p->py[i]) ;
76
}
77
return
z ;
78
}
Generated by
1.8.6