We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0b7f65f commit cc42db1Copy full SHA for cc42db1
src/extract/geometry_util.cpp
@@ -11,7 +11,7 @@ double calculate_double_area(const std::vector<osmium::Location>& coordinates) {
11
12
for (unsigned i = 1; i < coordinates.size(); ++i) {
13
auto const cur = coordinates[i];
14
- total += prev.lon() * cur.lat() - cur.lon() * prev.lat();
+ total += (prev.lon() * cur.lat()) - (cur.lon() * prev.lat());
15
prev = cur;
16
}
17
@@ -26,7 +26,7 @@ double calculate_double_area(const std::vector<osmium::geom::Coordinates>& coord
26
27
28
29
- total += prev.x * cur.y - cur.x * prev.y;
+ total += (prev.x * cur.y) - (cur.x * prev.y);
30
31
32
0 commit comments