Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:35:26

0001 // Boost.Geometry
0002 
0003 // Copyright (c) 2017 Oracle and/or its affiliates.
0004 
0005 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
0006 
0007 // Use, modification and distribution is subject to the Boost Software License,
0008 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
0009 // http://www.boost.org/LICENSE_1_0.txt)
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 } // namespace formula
0039 #endif // DOXYGEN_NO_DETAIL
0040 
0041 }} // namespace boost::geometry
0042 
0043 #endif // BOOST_GEOMETRY_FORMULAS_UNIT_SPHEROID_HPP