--- trunk/SHAPES/SHFunc.cpp 2004/06/25 18:58:12 1308 +++ trunk/SHAPES/SHFunc.cpp 2004/06/25 20:10:53 1309 @@ -7,12 +7,8 @@ double SHFunc::getValueAt(double costheta, double phi) double SHFunc::getValueAt(double costheta, double phi) { - double f, p, phase; + double p, phase; - // incredibly inefficient way to get the normalization - - // normalization factor: - f = sqrt( (2*L+1)/(4.0*M_PI) * Fact(L-M) / Fact(L+M) ); // associated Legendre polynomial p = LegendreP(L,M,costheta); @@ -22,7 +18,7 @@ double SHFunc::getValueAt(double costheta, double phi) phase = cos((double)M * phi); } - return coefficient*f*p*phase; + return coefficient*p*phase; } //-----------------------------------------------------------------------------// @@ -75,13 +71,3 @@ double SHFunc::Fact(double n) { } } -double SHFunc::Fact(double n) { - - if (n < 0.0) return NAN; - else { - if (n < 2.0) return 1.0; - else - return n*Fact(n-1.0); - } - -}