• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Boost.Geometry
2 
3 // Copyright (c) 2017-2018, Oracle and/or its affiliates.
4 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
5 
6 // Use, modification and distribution is subject to the Boost Software License,
7 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
8 // http://www.boost.org/LICENSE_1_0.txt)
9 
10 #ifndef BOOST_GEOMETRY_PROJECTIONS_INVALID_POINT_HPP
11 #define BOOST_GEOMETRY_PROJECTIONS_INVALID_POINT_HPP
12 
13 
14 #include <cmath>
15 
16 #include <boost/geometry/core/access.hpp>
17 
18 
19 namespace boost { namespace geometry { namespace projections
20 {
21 
22 // Originally in pj_transform()
23 template <typename Point>
set_invalid_point(Point & point)24 inline void set_invalid_point(Point & point)
25 {
26     geometry::set<0>(point, HUGE_VAL);
27     geometry::set<1>(point, HUGE_VAL);
28 }
29 
30 template <typename Point>
is_invalid_point(Point const & point)31 inline bool is_invalid_point(Point const& point)
32 {
33     return geometry::get<0>(point) == HUGE_VAL;
34 }
35 
36 }}} // namespace boost::geometry::projections
37 
38 #endif // BOOST_GEOMETRY_PROJECTIONS_INVALID_POINT_HPP
39