diff options
| author | Thomas Knudsen <lastname DOT firstname AT gmail DOT com> | 2016-04-12 23:24:43 +0200 |
|---|---|---|
| committer | Thomas Knudsen <lastname DOT firstname AT gmail DOT com> | 2016-04-12 23:24:43 +0200 |
| commit | 2f5893fa96213d5ef77328471918d2bd25645a9c (patch) | |
| tree | 3eca9b03ecf29f3748ee5f5216dc50a432f69349 /src | |
| parent | 240b3cdd740630be906a99c1325f8aa7d3c91b71 (diff) | |
| download | PROJ-2f5893fa96213d5ef77328471918d2bd25645a9c.tar.gz PROJ-2f5893fa96213d5ef77328471918d2bd25645a9c.zip | |
Reverting isnan check since MSVC needs a NaNny
MSVC, in some versions has _isnan(), rather than isnan()... but why?
Diffstat (limited to 'src')
| -rw-r--r-- | src/pj_generic_selftest.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/pj_generic_selftest.c b/src/pj_generic_selftest.c index 2af3f3b9..88b5c308 100644 --- a/src/pj_generic_selftest.c +++ b/src/pj_generic_selftest.c @@ -150,10 +150,10 @@ static int deviates_xy (XY expected, XY got, double tolerance) { only by forcing expected and actual ("got") coordinates to 0. ***********************************************************************/ - if ((HUGE_VAL== expected.x) || (isnan (expected.x))) - expected.x = got.x = 0; - if ((HUGE_VAL== expected.y) || (isnan (expected.y))) - expected.y = got.y = 0; + if (HUGE_VAL== expected.x) + return 0; + if (HUGE_VAL== expected.y) + return 0; if (hypot ( expected.x - got.x, expected.y - got.y ) > tolerance) return 1; return 0; @@ -173,10 +173,10 @@ static int deviates_lp (LP expected, LP got, double tolerance) { output from pj_inv) ***********************************************************************/ - if ((HUGE_VAL== expected.lam) || (isnan (expected.lam))) - expected.lam = got.lam = 0; - if ((HUGE_VAL== expected.phi) || (isnan (expected.phi))) - expected.phi = got.phi = 0; + if (HUGE_VAL== expected.lam) + return 0; + if (HUGE_VAL== expected.phi) + return 0; if (hypot ( DEG_TO_RAD * expected.lam - got.lam, DEG_TO_RAD * expected.phi - got.phi ) > tolerance) return 1; return 0; |
