]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/geometry/doc/src/examples/core/get_point.cpp
1 // Boost.Geometry (aka GGL, Generic Geometry Library)
4 // Copyright (c) 2011-2012 Barend Gehrels, Amsterdam, the Netherlands.
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)
11 //` Get the coordinate of a point
15 #include <boost/geometry.hpp>
16 #include <boost/geometry/geometries/point_xy.hpp>
18 namespace bg
= boost::geometry
;
22 bg::model::d2::point_xy
<double> point(1, 2);
24 double x
= bg::get
<0>(point
);
25 double y
= bg::get
<1>(point
);
27 std::cout
<< "x=" << x
<< " y=" << y
<< std::endl
;