mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-05 21:24:27 +02:00
refactor: earth_radius
moved to cpp file
This commit is contained in:
@@ -24,6 +24,13 @@
|
||||
#include <cmath>
|
||||
#include <numbers>
|
||||
|
||||
namespace {
|
||||
|
||||
using namespace units::physical::si::unit_constants;
|
||||
inline constexpr auto earth_radius = 6371 * km;
|
||||
|
||||
} // namespace
|
||||
|
||||
namespace geographic {
|
||||
|
||||
distance spherical_distance(position from, position to)
|
||||
|
@@ -119,9 +119,6 @@ namespace geographic {
|
||||
struct horizontal_kind : units::kind<horizontal_kind, units::physical::si::dim_length> {};
|
||||
using distance = units::quantity_kind<horizontal_kind, units::physical::si::kilometre>;
|
||||
|
||||
using namespace units::physical::si::unit_constants;
|
||||
inline constexpr auto earth_radius = 6371 * km;
|
||||
|
||||
struct position {
|
||||
latitude lat;
|
||||
longitude lon;
|
||||
|
Reference in New Issue
Block a user