• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Boost.Geometry (aka GGL, Generic Geometry Library)
2 
3 // Copyright (c) 2015-2018, Oracle and/or its affiliates.
4 
5 // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
6 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
7 
8 // Licensed under the Boost Software License version 1.0.
9 // http://www.boost.org/users/license.html
10 
11 #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_NORMALIZE_HPP
12 #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_NORMALIZE_HPP
13 
14 
15 // For backward compatibility
16 #include <boost/geometry/strategies/normalize.hpp>
17 
18 
19 namespace boost { namespace geometry
20 {
21 
22 
23 #ifndef DOXYGEN_NO_DETAIL
24 namespace detail
25 {
26 
27 
28 template <typename GeometryIn, typename GeometryOut, typename Strategy>
normalize(GeometryIn const & geometry_in,GeometryOut & geometry_out,Strategy const &)29 inline void normalize(GeometryIn const& geometry_in, GeometryOut& geometry_out, Strategy const& )
30 {
31     Strategy::apply(geometry_in, geometry_out);
32 }
33 
34 template <typename GeometryOut, typename GeometryIn, typename Strategy>
return_normalized(GeometryIn const & geometry_in,Strategy const & strategy)35 inline GeometryOut return_normalized(GeometryIn const& geometry_in, Strategy const& strategy)
36 {
37     GeometryOut geometry_out;
38     detail::normalize(geometry_in, geometry_out, strategy);
39     return geometry_out;
40 }
41 
42 
43 } // namespace detail
44 #endif // DOXYGEN_NO_DETAIL
45 
46 }} // namespace boost::geometry
47 
48 #endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_NORMALIZE_HPP
49