aboutsummaryrefslogtreecommitdiff
path: root/src/mtx_spherical_harmonics
diff options
context:
space:
mode:
authorFranz Zotter <fzotter@users.sourceforge.net>2013-03-13 14:33:53 +0000
committerFranz Zotter <fzotter@users.sourceforge.net>2013-03-13 14:33:53 +0000
commit4fc2fa90574865a43156c030c9b5e976952045c5 (patch)
treeb1e25fea023dabd6f346c3e3578930cb69fb6468 /src/mtx_spherical_harmonics
parenteada6ea99f528d88a716738c3ea0adc0265f4416 (diff)
took a too large difference from unsigned int in legendre_a.c. corrected
m<=n-2 to m+2<=n svn path=/trunk/externals/iem/iemmatrix/; revision=17061
Diffstat (limited to 'src/mtx_spherical_harmonics')
-rw-r--r--src/mtx_spherical_harmonics/legendre_a.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mtx_spherical_harmonics/legendre_a.c b/src/mtx_spherical_harmonics/legendre_a.c
index aa42949..602869c 100644
--- a/src/mtx_spherical_harmonics/legendre_a.c
+++ b/src/mtx_spherical_harmonics/legendre_a.c
@@ -45,7 +45,7 @@ static void legendre_second_recurrence (double *costheta, LegendreWorkSpace *wl)
// P_n^m with m=n
for (n=1; n<=wl->nmax; n++) {
for (m=0; m<n; m++) {
- if (m<=n-2) {
+ if (m+2<=n) {
for (l=0,l0=0; l<wl->l; l++,l0+=incr) {
wl->p[l0+n0+m] = (
(2*n-1) * costheta[l] * wl->p[l0+nmo0+m]