From 2f5893fa96213d5ef77328471918d2bd25645a9c Mon Sep 17 00:00:00 2001 From: Thomas Knudsen Date: Tue, 12 Apr 2016 23:24:43 +0200 Subject: Reverting isnan check since MSVC needs a NaNny MSVC, in some versions has _isnan(), rather than isnan()... but why? --- src/pj_generic_selftest.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src') 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; -- cgit v1.2.3