|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r83907 - in trunk: boost/polygon/detail libs/polygon/example/input_data/primary libs/polygon/example/output_data/primary
From: sydorchuk.andriy_at_[hidden]
Date: 2013-04-14 17:54:02
Author: asydorchuk
Date: 2013-04-14 17:54:01 EDT (Sun, 14 Apr 2013)
New Revision: 83907
URL: http://svn.boost.org/trac/boost/changeset/83907
Log:
Polygon: fixing ulp comparison range between Voronoi vertices and sites.
Added:
trunk/libs/polygon/example/input_data/primary/primary_072.txt (contents, props changed)
trunk/libs/polygon/example/output_data/primary/primary_072.png (contents, props changed)
Text files modified:
trunk/boost/polygon/detail/voronoi_predicates.hpp | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
Modified: trunk/boost/polygon/detail/voronoi_predicates.hpp
==============================================================================
--- trunk/boost/polygon/detail/voronoi_predicates.hpp (original)
+++ trunk/boost/polygon/detail/voronoi_predicates.hpp 2013-04-14 17:54:01 EDT (Sun, 14 Apr 2013)
@@ -35,7 +35,8 @@
enum {
ULPS = 64,
- ULPSx2 = 128
+ ULPSx2 = 128,
+ ULPSx5 = 320
};
template <typename Point>
@@ -160,21 +161,21 @@
bool operator()(const site_type& lhs, const circle_type& rhs) const {
typename ulp_cmp_type::Result xCmp =
- ulp_cmp(to_fpt(lhs.x()), to_fpt(rhs.lower_x()), ULPS);
+ ulp_cmp(to_fpt(lhs.x()), to_fpt(rhs.lower_x()), ULPSx5);
if (xCmp != ulp_cmp_type::EQUAL)
return xCmp == ulp_cmp_type::LESS;
typename ulp_cmp_type::Result yCmp =
- ulp_cmp(to_fpt(lhs.y()), to_fpt(rhs.lower_y()), ULPS);
+ ulp_cmp(to_fpt(lhs.y()), to_fpt(rhs.lower_y()), ULPSx5);
return yCmp == ulp_cmp_type::LESS;
}
bool operator()(const circle_type& lhs, const site_type& rhs) const {
typename ulp_cmp_type::Result xCmp =
- ulp_cmp(to_fpt(lhs.lower_x()), to_fpt(rhs.x()), ULPS);
+ ulp_cmp(to_fpt(lhs.lower_x()), to_fpt(rhs.x()), ULPSx5);
if (xCmp != ulp_cmp_type::EQUAL)
return xCmp == ulp_cmp_type::LESS;
typename ulp_cmp_type::Result yCmp =
- ulp_cmp(to_fpt(lhs.lower_y()), to_fpt(rhs.y()), ULPS);
+ ulp_cmp(to_fpt(lhs.lower_y()), to_fpt(rhs.y()), ULPSx5);
return yCmp == ulp_cmp_type::LESS;
}
Added: trunk/libs/polygon/example/input_data/primary/primary_072.txt
==============================================================================
--- (empty file)
+++ trunk/libs/polygon/example/input_data/primary/primary_072.txt 2013-04-14 17:54:01 EDT (Sun, 14 Apr 2013)
@@ -0,0 +1,5 @@
+0
+3
+1403829871 74 1403829871 275
+1403829871 275 1403829741 275
+1403829741 275 1403829744 73
\ No newline at end of file
Added: trunk/libs/polygon/example/output_data/primary/primary_072.png
==============================================================================
Binary file. No diff available.
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk