Subject: [Boost-bugs] [Boost C++ Libraries] #9556: within fails on simple case
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-01-08 23:59:04
#9556: within fails on simple case
------------------------------+---------------------------
Reporter: ramey | Owner: barendgehrels
Type: Bugs | Status: new
Milestone: To Be Determined | Component: geometry
Version: Boost 1.55.0 | Severity: Problem
Keywords: |
------------------------------+---------------------------
the attached case illustrates to me that with fails on a simple case.
{{{
// simple test of boost geometry function within
bool test1(){
typedef boost::geometry::model::d2::point_xy<float> point;
typedef boost::geometry::model::ring<point, false, false> ring;
ring r;
r.push_back(point(-2054781.4f, 1327536.6f));
r.push_back(point(-2042300.1f, 1275254.1f));
r.push_back(point(-2142418.5f, 1333733.5f));
r.push_back(point(-2122850.5f, 1553784.4f));
//r.push_back(point(-2054781.4f, 1327536.6f));
point pt(-2238243.8f, 1523654.5f);
bool result = boost::geometry::within(pt, r);
// result should be false - but returns true
if(result != false)
return false;
point pt2(-210000.8f, 1350000.5f);
result = boost::geometry::within(pt2, r);
// result should be true - but returns false
if(result != true)
return false;
// if we made here - fine
return true;
}
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/9556> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:15 UTC