]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/geometry/test/strategies/projected_point.cpp
1 // Boost.Geometry (aka GGL, Generic Geometry Library)
4 // Copyright (c) 2007-2014 Barend Gehrels, Amsterdam, the Netherlands.
5 // Copyright (c) 2008-2014 Bruno Lalande, Paris, France.
6 // Copyright (c) 2009-2014 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 Menelaos Karavelas, on behalf of Oracle
12 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
14 // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
15 // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
17 // Use, modification and distribution is subject to the Boost Software License,
18 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
19 // http://www.boost.org/LICENSE_1_0.txt)
22 #include <strategies/test_projected_point.hpp>
25 template <typename P1
, typename P2
>
28 test_2d
<P1
, P2
>("POINT(1 1)", "POINT(0 0)", "POINT(2 3)", 0.27735203958327);
29 test_2d
<P1
, P2
>("POINT(2 2)", "POINT(1 4)", "POINT(4 1)", 0.5 * sqrt(2.0));
30 test_2d
<P1
, P2
>("POINT(6 1)", "POINT(1 4)", "POINT(4 1)", 2.0);
31 test_2d
<P1
, P2
>("POINT(1 6)", "POINT(1 4)", "POINT(4 1)", 2.0);
37 //test_all_2d<P, int[2]>();
38 //test_all_2d<P, float[2]>();
39 //test_all_2d<P, double[2]>();
40 //test_all_2d<P, test::test_point>();
41 test_all_2d
<P
, bg::model::point
<int, 2, bg::cs::cartesian
> >();
42 test_all_2d
<P
, bg::model::point
<float, 2, bg::cs::cartesian
> >();
43 test_all_2d
<P
, bg::model::point
<double, 2, bg::cs::cartesian
> >();
44 test_all_2d
<P
, bg::model::point
<long double, 2, bg::cs::cartesian
> >();
47 int test_main(int, char* [])
49 test_all_2d
<int[2]>();
50 test_all_2d
<float[2]>();
51 test_all_2d
<double[2]>();
52 //test_all_2d<test::test_point>();
54 test_all_2d
<bg::model::point
<int, 2, bg::cs::cartesian
> >();
55 test_all_2d
<bg::model::point
<float, 2, bg::cs::cartesian
> >();
56 test_all_2d
<bg::model::point
<double, 2, bg::cs::cartesian
> >();
60 bg::model::point
<double, 2, bg::cs::cartesian
>,
61 bg::model::point
<float, 2, bg::cs::cartesian
>,