|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r81028 - trunk/boost/polygon
From: sydorchuk.andriy_at_[hidden]
Date: 2012-10-20 16:49:43
Author: asydorchuk
Date: 2012-10-20 16:49:42 EDT (Sat, 20 Oct 2012)
New Revision: 81028
URL: http://svn.boost.org/trac/boost/changeset/81028
Log:
Polygon: fixing point test.
Text files modified:
trunk/boost/polygon/point_concept.hpp | 34 +++++++++++++++++-----------------
1 files changed, 17 insertions(+), 17 deletions(-)
Modified: trunk/boost/polygon/point_concept.hpp
==============================================================================
--- trunk/boost/polygon/point_concept.hpp (original)
+++ trunk/boost/polygon/point_concept.hpp 2012-10-20 16:49:42 EDT (Sat, 20 Oct 2012)
@@ -290,12 +290,12 @@
return (dif < 0) ? -dif : dif;
}
-struct y_pt_ed2 : gtl_yes {};
+struct y_pt_eds : gtl_yes {};
template <typename PointType1, typename PointType2>
typename enable_if<
typename gtl_and_3<
- y_pt_ed2,
+ y_pt_eds,
typename is_point_concept<
typename geometry_concept<PointType1>::type
>::type,
@@ -303,18 +303,23 @@
typename geometry_concept<PointType2>::type
>::type
>::type,
-typename point_distance_type<PointType1>::type>::type
-euclidean_distance(const PointType1& point1, const PointType2& point2) {
- return (std::sqrt)(
- static_cast<double>(distance_squared(point1, point2)));
+typename point_difference_type<PointType1>::type>::type
+distance_squared(const PointType1& point1, const PointType2& point2) {
+ typename point_difference_type<PointType1>::type dx =
+ euclidean_distance(point1, point2, HORIZONTAL);
+ typename point_difference_type<PointType1>::type dy =
+ euclidean_distance(point1, point2, VERTICAL);
+ dx *= dx;
+ dy *= dy;
+ return dx + dy;
}
-struct y_pt_eds : gtl_yes {};
+struct y_pt_ed2 : gtl_yes {};
template <typename PointType1, typename PointType2>
typename enable_if<
typename gtl_and_3<
- y_pt_eds,
+ y_pt_ed2,
typename is_point_concept<
typename geometry_concept<PointType1>::type
>::type,
@@ -322,15 +327,10 @@
typename geometry_concept<PointType2>::type
>::type
>::type,
-typename point_difference_type<PointType1>::type>::type
-distance_squared(const PointType1& point1, const PointType2& point2) {
- typename point_difference_type<PointType1>::type dx =
- euclidean_distance(point1, point2, HORIZONTAL);
- typename point_difference_type<PointType1>::type dy =
- euclidean_distance(point1, point2, VERTICAL);
- dx *= dx;
- dy *= dy;
- return dx + dy;
+typename point_distance_type<PointType1>::type>::type
+euclidean_distance(const PointType1& point1, const PointType2& point2) {
+ return (std::sqrt)(
+ static_cast<double>(distance_squared(point1, point2)));
}
struct y_pt_convolve : gtl_yes {};
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