Ticket #6052: diffs

File diffs, 3.7 KB (added by Fedor Sergeev <Fedor.Sergeev@…>, 11 years ago)

patch for std::sqrt

Line 
1diff --git a/boost/polygon/point_3d_concept.hpp b/boost/polygon/point_3d_concept.hpp
2index ab7afeb..f29075e 100644
3--- a/boost/polygon/point_3d_concept.hpp
4+++ b/boost/polygon/point_3d_concept.hpp
5@@ -170,7 +170,7 @@ namespace boost { namespace polygon{
6 typedef typename coordinate_traits<typename point_3d_traits<point_type_1>::coordinate_type>::coordinate_distance return_value;
7 return_value pdist = (return_value)euclidean_distance(point1, point2, PROXIMAL);
8 pdist *= pdist;
9- return sqrt((double)(distance_squared(point1, point2) + pdist));
10+ return std::sqrt((double)(distance_squared(point1, point2) + pdist));
11 }
12
13 struct y_p3d_convolve : gtl_yes {};
14diff --git a/boost/polygon/point_concept.hpp b/boost/polygon/point_concept.hpp
15index 6e2ce0a..5e3e439 100644
16--- a/boost/polygon/point_concept.hpp
17+++ b/boost/polygon/point_concept.hpp
18@@ -174,7 +174,7 @@ namespace boost { namespace polygon{
19 typename point_distance_type<point_type_1>::type>::type
20 euclidean_distance(const point_type_1& point1, const point_type_2& point2) {
21 typedef typename point_traits<point_type_1>::coordinate_type Unit;
22- return sqrt((double)(distance_squared(point1, point2)));
23+ return std::sqrt((double)(distance_squared(point1, point2)));
24 }
25
26 template <typename point_type_1, typename point_type_2>
27diff --git a/boost/polygon/polygon_set_data.hpp b/boost/polygon/polygon_set_data.hpp
28index bbddacf..5ca4bf9 100644
29--- a/boost/polygon/polygon_set_data.hpp
30+++ b/boost/polygon/polygon_set_data.hpp
31@@ -637,7 +637,7 @@ namespace boost { namespace polygon {
32 point_data<double> v;
33 assign(v, normal1);
34 double s2 = (v.x()*v.x()+v.y()*v.y());
35- double s = sqrt(s2)/resizing;
36+ double s = std::sqrt(s2)/resizing;
37 v = point_data<double>(v.x()/s,v.y()/s);
38 point_data<T> curr_prev;
39 if (prev_concave)
40@@ -817,10 +817,10 @@ namespace boost { namespace polygon {
41
42 // handle the case of adding an intersection point
43 point_data<double> dn1( middle.y()-start.y(), start.x()-middle.x());
44- double size = sizing_distance/sqrt( dn1.x()*dn1.x()+dn1.y()*dn1.y());
45+ double size = sizing_distance/std::sqrt( dn1.x()*dn1.x()+dn1.y()*dn1.y());
46 dn1 = point_data<double>( dn1.x()*size, dn1.y()* size);
47 point_data<double> dn2( end.y()-middle.y(), middle.x()-end.x());
48- size = sizing_distance/sqrt( dn2.x()*dn2.x()+dn2.y()*dn2.y());
49+ size = sizing_distance/std::sqrt( dn2.x()*dn2.x()+dn2.y()*dn2.y());
50 dn2 = point_data<double>( dn2.x()*size, dn2.y()* size);
51 point_data<double> start_offset((start.x()+dn1.x()),(start.y()+dn1.y()));
52 point_data<double> mid1_offset((middle.x()+dn1.x()),(middle.y()+dn1.y()));
53diff --git a/boost/polygon/rectangle_concept.hpp b/boost/polygon/rectangle_concept.hpp
54index e302b99..5d8a99e 100644
55--- a/boost/polygon/rectangle_concept.hpp
56+++ b/boost/polygon/rectangle_concept.hpp
57@@ -919,7 +919,7 @@ namespace boost { namespace polygon{
58 typename is_point_concept<typename geometry_concept<point_type>::type>::type>::type,
59 typename rectangle_distance_type<rectangle_type>::type>::type
60 euclidean_distance(rectangle_type& lvalue, const point_type& rvalue) {
61- return sqrt((double)
62+ return std::sqrt((double)
63 (square_euclidean_distance(lvalue, rvalue)));
64 }
65
66@@ -931,7 +931,7 @@ namespace boost { namespace polygon{
67 typename rectangle_distance_type<rectangle_type>::type>::type
68 euclidean_distance(const rectangle_type& lvalue, const rectangle_type_2& rvalue) {
69 double val = (int)square_euclidean_distance(lvalue, rvalue);
70- return sqrt(val);
71+ return std::sqrt(val);
72 }
73
74 struct y_r_mdist : gtl_yes {};