]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/geometry/test/core/radius.cpp
1 // Boost.Geometry (aka GGL, Generic Geometry Library)
4 // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
5 // Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
6 // Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
8 // This file was modified by Oracle on 2014.
9 // Modifications copyright (c) 2014 Oracle and/or its affiliates.
11 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
13 // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
14 // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
16 // Use, modification and distribution is subject to the Boost Software License,
17 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
18 // http://www.boost.org/LICENSE_1_0.txt)
21 #include <geometry_test_common.hpp>
23 #include <boost/geometry/core/cs.hpp>
24 #include <boost/geometry/core/radius.hpp>
25 #include <boost/geometry/core/srs.hpp>
27 #include <boost/geometry/algorithms/make.hpp>
30 template <std::size_t I
, typename G
>
33 typedef typename
bg::radius_type
<G
>::type radius_type
;
36 bg::set_radius
<I
>(g
, radius_type(5));
38 radius_type x
= bg::get_radius
<I
>(g
);
40 BOOST_CHECK_CLOSE(double(x
), 5.0, 0.0001);
46 typedef bg::srs::spheroid
<T
> Sd
;
47 test_get_set
<0, Sd
>();
48 test_get_set
<2, Sd
>();
50 typedef bg::srs::sphere
<T
> Se
;
51 test_get_set
<0, Se
>();
55 int test_main(int, char* [])