function_overloads.hpp 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // Boost.Geometry (aka GGL, Generic Geometry Library)
  2. // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
  3. // This file was modified by Oracle on 2017, 2018.
  4. // Modifications copyright (c) 2017-2018, Oracle and/or its affiliates.
  5. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
  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. #ifndef BOOST_GEOMETRY_PROJECTIONS_IMPL_FUNCTION_OVERLOADS_HPP
  10. #define BOOST_GEOMETRY_PROJECTIONS_IMPL_FUNCTION_OVERLOADS_HPP
  11. #include <cmath>
  12. namespace boost { namespace geometry { namespace projections
  13. {
  14. // Functions to resolve ambiguity when compiling with coordinates of different types
  15. /*
  16. template <typename T>
  17. inline T atan2(T const& a, T const& b)
  18. {
  19. using std::atan2;
  20. return atan2(a, b);
  21. }
  22. */
  23. template <typename T>
  24. inline int int_floor(T const& f)
  25. {
  26. using std::floor;
  27. return int(floor(f));
  28. }
  29. }}} // namespace boost::geometry::projections
  30. #endif // BOOST_GEOMETRY_PROJECTIONS_IMPL_FUNCTION_OVERLOADS_HPP