File indexing completed on 2025-01-18 09:35:26
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef BOOST_GEOMETRY_FORMULAS_UNIT_SPHEROID_HPP
0012 #define BOOST_GEOMETRY_FORMULAS_UNIT_SPHEROID_HPP
0013
0014 #include <boost/geometry/core/radius.hpp>
0015
0016 namespace boost { namespace geometry
0017 {
0018
0019 #ifndef DOXYGEN_NO_DETAIL
0020 namespace formula
0021 {
0022
0023 template <typename ResultType, typename Spheroid>
0024 inline ResultType unit_spheroid_b(Spheroid const& spheroid)
0025 {
0026 return ResultType(get_radius<2>(spheroid))
0027 / ResultType(get_radius<0>(spheroid));
0028 }
0029
0030 template <typename ResultSpheroid, typename Spheroid>
0031 inline ResultSpheroid unit_spheroid(Spheroid const& spheroid)
0032 {
0033 typedef typename radius_type<ResultSpheroid>::type radius_t;
0034 return ResultSpheroid(radius_t(1),
0035 unit_spheroid_b<radius_t>(spheroid));
0036 }
0037
0038 }
0039 #endif
0040
0041 }}
0042
0043 #endif