Skip to content

Commit

Permalink
add latlng float conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
felixguendling committed Nov 3, 2024
1 parent cee1720 commit de5a358
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/geo/latlng.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ struct latlng {
}

std::array<double, 2> lnglat() const noexcept { return {lng_, lat_}; }
std::array<float, 2> lnglat_float() const noexcept {
return {static_cast<float>(lng_), static_cast<float>(lat_)};
}

double lat_{0.0}, lng_{0.0};
};
Expand Down

0 comments on commit de5a358

Please sign in to comment.