• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Boost.Geometry
2 
3 // Copyright (c) 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 
11 #ifndef BOOST_GEOMETRY_PROJECTIONS_CONSTANTS_HPP
12 #define BOOST_GEOMETRY_PROJECTIONS_CONSTANTS_HPP
13 
14 
15 #include <boost/geometry/util/math.hpp>
16 #include <boost/math/constants/constants.hpp>
17 
18 
19 namespace boost { namespace geometry { namespace projections
20 {
21 
22 #ifndef DOXYGEN_NO_DETAIL
23 namespace detail
24 {
25 
26 
27 template <typename T>
fourth_pi()28 inline T fourth_pi() { return T(0.78539816339744830961566084581988); }
29 template <typename T>
third_pi()30 inline T third_pi() { return boost::math::constants::third_pi<T>(); }
31 template <typename T>
half_pi()32 inline T half_pi() { return boost::math::constants::half_pi<T>(); }
33 template <typename T>
pi()34 inline T pi() { return boost::math::constants::pi<T>(); }
35 template <typename T>
one_and_half_pi()36 inline T one_and_half_pi() { return T(4.7123889803846898576939650749193); }
37 template <typename T>
two_pi()38 inline T two_pi() { return boost::math::constants::two_pi<T>(); }
39 template <typename T>
two_and_half_pi()40 inline T two_and_half_pi() { return T(7.8539816339744830961566084581988); }
41 
42 template <typename T>
two_div_pi()43 inline T two_div_pi() { return boost::math::constants::two_div_pi<T>(); }
44 template <typename T>
half_pi_sqr()45 inline T half_pi_sqr() { return T(2.4674011002723396547086227499689); }
46 template <typename T>
pi_sqr()47 inline T pi_sqr() { return boost::math::constants::pi_sqr<T>(); }
48 
49 template <typename T>
sixth()50 inline T sixth() { return boost::math::constants::sixth<T>(); }
51 template <typename T>
third()52 inline T third() { return boost::math::constants::third<T>(); }
53 template <typename T>
two_thirds()54 inline T two_thirds() { return boost::math::constants::two_thirds<T>(); }
55 
56 
57 } // namespace detail
58 #endif // DOXYGEN_NO_DETAIL
59 
60 
61 }}} // namespace boost::geometry::projections
62 #endif // BOOST_GEOMETRY_PROJECTIONS_IMPL_PROJECTS_HPP
63