]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/geometry/doc/src/examples/geometries/adapted/c_array.cpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / geometry / doc / src / examples / geometries / adapted / c_array.cpp
CommitLineData
7c673cae
FG
1// Boost.Geometry (aka GGL, Generic Geometry Library)
2// QuickBook Example
3
4// Copyright (c) 2011-2012 Barend Gehrels, Amsterdam, the Netherlands.
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//[c_array
11//` Small example showing the combination of an array with a Boost.Geometry algorithm
12
13#include <iostream>
14#include <boost/geometry.hpp>
15#include <boost/geometry/geometries/adapted/c_array.hpp>
16
17BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(cs::cartesian)
18
19int main()
20{
21 int a[3] = {1, 2, 3};
22 int b[3] = {2, 3, 4};
23
24 std::cout << boost::geometry::distance(a, b) << std::endl;
25
26 return 0;
27}
28
29//]
30
31//[c_array_output
32/*`
33Output:
34[pre
351.73205
36]
37*/
38//]