| # | Line 41 | Line 41 | |
|---|---|---|
| 41 | ||
| 42 | #include <stdio.h> | |
| 43 | #include <cmath> | |
| 44 | < | |
| 44 | > | #include <limits> |
| 45 | #include "math/RealSphericalHarmonic.hpp" | |
| 46 | ||
| 47 | using namespace oopse; | |
| # | Line 85 | Line 85 | double RealSphericalHarmonic::LegendreP (int l, int m, | |
| 85 | // check parameters | |
| 86 | if (m < 0 || m > l || fabs(x) > 1.0) { | |
| 87 | printf("LegendreP got a bad argument: l = %d\tm = %d\tx = %lf\n", l, m, x); | |
| 88 | < | return NAN; |
| 88 | > | // return NAN; |
| 89 | > | return std::numeric_limits <double>:: quiet_NaN(); |
| 90 | } | |
| 91 | ||
| 92 | double pmm = 1.0; | |
| – | Removed lines |
| + | Added lines |
| < | Changed lines |
| > | Changed lines |