Go to the documentation of this file.00001
00002 #ifndef vnl_fit_parabola_h_
00003 #define vnl_fit_parabola_h_
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 inline void vnl_fit_parabola(double xa, double xb, double xc,
00019 double fa, double fb, double fc,
00020 double& p, double& q)
00021 {
00022
00023
00024
00025 double x1=xa-xb, f1 = fa-fb;
00026 double x2=xc-xb, f2 = fc-fb;
00027 p = x2*x2*f1-x1*x1*f2;
00028 q = 2*(x2*f1-x1*f2);
00029 }
00030
00031 #endif // vnl_fit_parabola_h_