Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 09:51:41

0001 // Boost.Geometry
0002 
0003 // Copyright (c) 2018 Oracle and/or its affiliates.
0004 
0005 // Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
0006 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
0007 
0008 // Use, modification and distribution is subject to the Boost Software License,
0009 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
0010 // http://www.boost.org/LICENSE_1_0.txt)
0011 
0012 #ifndef BOOST_GEOMETRY_UTIL_IS_INVERSE_SPHEROIDAL_COORDINATES_HPP
0013 #define BOOST_GEOMETRY_UTIL_IS_INVERSE_SPHEROIDAL_COORDINATES_HPP
0014 
0015 #include <boost/geometry/core/access.hpp>
0016 #include <boost/geometry/core/coordinate_type.hpp>
0017 #include <boost/geometry/core/point_type.hpp>
0018 
0019 #include <boost/geometry/util/bounds.hpp>
0020 #include <boost/geometry/util/math.hpp>
0021 
0022 namespace boost { namespace geometry
0023 {
0024 
0025 template <typename Box>
0026 bool is_inverse_spheroidal_coordinates(Box const& box)
0027 {
0028     using point_type = point_type_t<Box>;
0029     using bound_type = coordinate_type_t<point_type>;
0030 
0031     bound_type const high = util::bounds<bound_type>::highest();
0032     bound_type const low = util::bounds<bound_type>::lowest();
0033 
0034     return (geometry::get<0, 0>(box) == high) &&
0035            (geometry::get<0, 1>(box) == high) &&
0036            (geometry::get<1, 0>(box) == low) &&
0037            (geometry::get<1, 1>(box) == low);
0038 }
0039 
0040 }} // namespace boost::geometry
0041 
0042 #endif // BOOST_GEOMETRY_UTIL_IS_INVERSE_SPHEROIDAL_COORDINATES_HPP