aboutsummaryrefslogtreecommitdiff
path: root/src/math.cpp
diff options
context:
space:
mode:
authorCharles Karney <charles.karney@sri.com>2019-09-17 11:50:45 -0400
committerCharles Karney <charles.karney@sri.com>2019-09-17 11:50:45 -0400
commitc080801637b5b3c1fe7462829411a6859ce581dd (patch)
treecc3015ed68663dc2643f06f655447581febc6a6f /src/math.cpp
parentb154e42c917288124ef64c458b91a0efabd4e568 (diff)
downloadPROJ-c080801637b5b3c1fe7462829411a6859ce581dd.tar.gz
PROJ-c080801637b5b3c1fe7462829411a6859ce581dd.zip
Fix floating-point number into integer warning in math.cpp
Diffstat (limited to 'src/math.cpp')
-rw-r--r--src/math.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/math.cpp b/src/math.cpp
index 0ec4f57f..6c1b6d1b 100644
--- a/src/math.cpp
+++ b/src/math.cpp
@@ -65,7 +65,7 @@ double pj_hypot(double x, double y) {
x /= y; /* y is nonzero */
return y * sqrt(1 + x * x);
} else {
- y /= (x ? x : 1);
+ y /= (x != 0 ? x : 1);
return x * sqrt(1 + y * y);
}
}