1 #ifndef OSMIUM_GEOM_UTIL_HPP 2 #define OSMIUM_GEOM_UTIL_HPP 48 std::runtime_error(what) {
52 std::runtime_error(what) {
59 constexpr
double PI = 3.14159265358979323846;
62 inline constexpr
double deg_to_rad(
double degree) noexcept {
63 return degree * (PI / 180.0);
67 inline constexpr
double rad_to_deg(
double radians) noexcept {
68 return radians * (180.0 /
PI);
75 #endif // OSMIUM_GEOM_UTIL_HPP Definition: reader_iterator.hpp:39
projection_error(const char *what)
Definition: util.hpp:51
Namespace for everything in the Osmium library.
Definition: assembler.hpp:73
constexpr double deg_to_rad(double degree) noexcept
Convert angle from degrees to radians.
Definition: util.hpp:62
projection_error(const std::string &what)
Definition: util.hpp:47
constexpr double PI
Definition: util.hpp:59
constexpr double rad_to_deg(double radians) noexcept
Convert angle from radians to degrees.
Definition: util.hpp:67