normalize.hpp 1.3 KB

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