From 1d5ef23cb7130b419ffac4a9f80b610d11012346 Mon Sep 17 00:00:00 2001 From: Dmitry Anisimov Date: Fri, 25 Jun 2021 10:45:02 +0200 Subject: [PATCH 1/2] removed some conversions from double to FT in examples --- Weights/examples/Weights/coordinates_one_query.cpp | 4 +--- Weights/examples/Weights/projection_traits.cpp | 6 ++---- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/Weights/examples/Weights/coordinates_one_query.cpp b/Weights/examples/Weights/coordinates_one_query.cpp index e533c8ad717..08873af009a 100644 --- a/Weights/examples/Weights/coordinates_one_query.cpp +++ b/Weights/examples/Weights/coordinates_one_query.cpp @@ -11,9 +11,7 @@ int main() { // Create a polygon and a query point. const std::vector polygon = { Point_2(0, 0), Point_2(1, 0), Point_2(1, 1), Point_2(0, 1) }; - - const FT half = FT(1) / FT(2); - const Point_2 query(half, half); + const Point_2 query(0.5, 0.5); // Allocate memory for weights and coordinates. std::vector weights; diff --git a/Weights/examples/Weights/projection_traits.cpp b/Weights/examples/Weights/projection_traits.cpp index 92b88ee03c0..f523978882f 100644 --- a/Weights/examples/Weights/projection_traits.cpp +++ b/Weights/examples/Weights/projection_traits.cpp @@ -16,9 +16,7 @@ int main() { // Create a polygon and a query point. const std::vector polygon = { Point_3(0, 0, 1), Point_3(1, 0, 1), Point_3(1, 1, 1), Point_3(0, 1, 1) }; - - const FT half = FT(1) / FT(2); - const Point_3 query(half, half, 1); + const Point_3 query(0.5, 0.5, 1); // Allocate memory for weights. std::vector weights; @@ -38,7 +36,7 @@ int main() { std::cout << std::endl; // Almost coplanar case. - const FT eps = FT(1) / FT(1000); + const FT eps = 0.001; const Point_3 t3(-1, 0, 1.0 + eps); const Point_3 r3( 0, -1, 1); const Point_3 p3( 1, 0, 1.0 + eps); From b66b71aabc3fe376c9de39ffe1462d88053307aa Mon Sep 17 00:00:00 2001 From: Dmitry Anisimov Date: Fri, 25 Jun 2021 11:18:13 +0200 Subject: [PATCH 2/2] added doxygen comment to Weights.h --- Weights/include/CGAL/Weights.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Weights/include/CGAL/Weights.h b/Weights/include/CGAL/Weights.h index 5466af9d127..c623955eb63 100644 --- a/Weights/include/CGAL/Weights.h +++ b/Weights/include/CGAL/Weights.h @@ -16,6 +16,11 @@ #include +/** +@file Weights.h +@brief a convenience header that includes all weights. +*/ + #include #include