aboutsummaryrefslogtreecommitdiff
path: root/src/projections
diff options
context:
space:
mode:
Diffstat (limited to 'src/projections')
-rw-r--r--src/projections/eqearth.cpp2
-rw-r--r--src/projections/igh.cpp2
-rw-r--r--src/projections/isea.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/projections/eqearth.cpp b/src/projections/eqearth.cpp
index dc58eed9..73499262 100644
--- a/src/projections/eqearth.cpp
+++ b/src/projections/eqearth.cpp
@@ -26,7 +26,7 @@ PROJ_HEAD(eqearth, "Equal Earth") "\n\tPCyl, Sph&Ell";
#define A2 -0.081106
#define A3 0.000893
#define A4 0.003796
-#define M (sqrt(3) / 2.0)
+#define M (sqrt(3.0) / 2.0)
#define MAX_Y 1.3173627591574 /* 90° latitude on a sphere with radius 1 */
#define EPS 1e-11
diff --git a/src/projections/igh.cpp b/src/projections/igh.cpp
index a8efbb9d..d6b2d38d 100644
--- a/src/projections/igh.cpp
+++ b/src/projections/igh.cpp
@@ -77,7 +77,7 @@ static PJ_XY s_forward (PJ_LP lp, PJ *P) { /* Spheroidal, forward */
static PJ_LP s_inverse (PJ_XY xy, PJ *P) { /* Spheroidal, inverse */
PJ_LP lp = {0.0,0.0};
struct pj_opaque *Q = static_cast<struct pj_opaque*>(P->opaque);
- const double y90 = Q->dy0 + sqrt(2); /* lt=90 corresponds to y=y0+sqrt(2) */
+ const double y90 = Q->dy0 + sqrt(2.0); /* lt=90 corresponds to y=y0+sqrt(2) */
int z = 0;
if (xy.y > y90+EPSLN || xy.y < -y90+EPSLN) /* 0 */
diff --git a/src/projections/isea.cpp b/src/projections/isea.cpp
index 3a0a0a48..d53317c1 100644
--- a/src/projections/isea.cpp
+++ b/src/projections/isea.cpp
@@ -847,7 +847,7 @@ static long isea_disn(struct isea_dgg *g, int quad, struct isea_pt *di) {
return g->serial;
}
/* hexes in a quad */
- hexes = lround(pow(g->aperture, g->resolution));
+ hexes = lround(pow(static_cast<double>(g->aperture), static_cast<double>(g->resolution)));
if (quad == 11) {
g->serial = 1 + 10 * hexes + 1;
return g->serial;