aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pj_generic_selftest.c16
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;