Skip to content

Commit 8ba8612

Browse files
committed
We don't need the exp() function for squaring a number
1 parent f0b7a3f commit 8ba8612

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/expire-tiles.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ void expire_tiles::from_line_segment(geom::point_t const &a,
174174
}
175175

176176
double const y_len = tilec_b.y() - tilec_a.y();
177-
double const hyp_len = sqrt(pow(x_len, 2) + pow(y_len, 2)); /* Pythagoras */
177+
double const hyp_len = std::sqrt(x_len * x_len + y_len * y_len); /* Pythagoras */
178178
double const x_step = x_len / hyp_len;
179179
double const y_step = y_len / hyp_len;
180180

0 commit comments

Comments
 (0)