Skip to content

Commit

Permalink
Fixing issue #6 - counting in Legendre function
Browse files Browse the repository at this point in the history
  • Loading branch information
ifilot committed Jul 29, 2018
1 parent 829963e commit 130b532
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/spherical_harmonics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ double SH::legendre (int n, double x) {
return -1;
}

double v[n];
v[0] = 1.0;
std::vector<double> v(n+1, 0.0);

if(n < 1) {
return 1.0;
Expand Down Expand Up @@ -84,11 +83,7 @@ double SH::legendre_p (int n, int m, double x) {
int i;
int j;
int k;
double v[n+1];

for ( i = 0; i < n + 1; i++ ) {
v[i] = 0.0;
}
std::vector<double> v(n+1, 0.0);

//
// J = M is the first nonzero function.
Expand Down

0 comments on commit 130b532

Please sign in to comment.