Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:36:52

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/math.hpp>
0020 
0021 namespace boost { namespace geometry
0022 {
0023 
0024 template<class CT>
0025 struct bounds
0026 {
0027   static CT lowest  () { return boost::numeric::bounds<CT>::lowest(); }
0028   static CT highest () { return boost::numeric::bounds<CT>::highest(); }
0029 };
0030 
0031 template <typename Box>
0032 bool is_inverse_spheroidal_coordinates(Box const& box)
0033 {
0034     typedef typename point_type<Box>::type point_type;
0035     typedef typename coordinate_type<point_type>::type bound_type;
0036 
0037     bound_type high = bounds<bound_type>::highest();
0038     bound_type low = bounds<bound_type>::lowest();
0039 
0040     return (geometry::get<0, 0>(box) == high) &&
0041            (geometry::get<0, 1>(box) == high) &&
0042            (geometry::get<1, 0>(box) == low) &&
0043            (geometry::get<1, 1>(box) == low);
0044 }
0045 
0046 }} // namespace boost::geometry
0047 
0048 #endif // BOOST_GEOMETRY_UTIL_IS_INVERSE_SPHEROIDAL_COORDINATES_HPP